Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dialing the phone
Message
De
12/06/1998 20:27:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00107670
Message ID:
00107778
Vues:
12
>Hi,
>
>I have someone who wants a program that will hold customer details and
>telephone numbers, and wants the ability for the program to dial the
>customer numbers for them.
>
>Is there someway to get a VFP app to call SuperVoice2.2 or the Telephone
>dialler (teleworks) that is including in WinFax Pro ?
>
>I know you can interact with WinFax Pro for faxing via DDE and I have done
>this before without problem, but there doesn't seem to be a way to interact
>to make a voice call.
>
>I would appreciate any help & would appreciate if you could send your
>replies to my own email address as well as to the group. As I rarely get the
>time to keep up with the group.
>
>Thanks.
>
>David Renton.
>mailto:david@css02.globalnet.co.uk
>mailto:david@css01.globalnet.co.uk
>http://www.users.globalnet.co.uk/~css01
>mailto:drenton@141.com
>http://www.yi.com/home/RentonDavid
>
>
>Marie Renton.
>mailto:mrenton@magnificent.net
>http://www.geocities.com/SouthBeach/4037


Give this a shot:

IF !( 'FOXTOOLS' $ UPPER(SET('LIBRARY')) )
SET LIBRARY TO FOXTOOLS ADDI
ENDIF

LOCAL lccomport,lcdstring,lnport,lcfonelook

lccomport='COM2'
lcdstring = "ATDT " + m_fone + CHR(13)

opencomm = RegFn("OpenComm", "CII", "I",'User.exe')
writecomm = RegFn("WriteComm", "ICI", "I",'User.exe')
closecomm = RegFn("CloseComm", "I", "I",'User.exe')

lnport = CallFn(OpenComm,lccomport, 100, 100)

=CallFn(WriteComm, lnport, lcdstring, len(lcdstring))

lcfonelook=IIF(m_fone='1','1 - '+FONE(SUBS(m_fone,2)),FONE(m_fone))
=MESSAGEBOX('Dialing '+ALLT(lcfonelook)+CHR(13)+CHR(13)+;
"Pick up the phone and press any key ",64)

lcdstring=CHR(10)+CHR(13)+CHR(10)+CHR(13)
=CallFn(WriteComm, lnport, lcdstring, len(lcdstring))
=CallFn(CloseComm, lnport)

PROCEDURE FONE
* Function to return a formatted string from a passed phone number

PARA pFONE

LOCAL lcretval
lcretval=PADL(ALLT(pFONE),14)
DO CASE
CASE LEN(ALLT(pFONE))=7
lcretval=SPAC(6)+SUBS(pFONE,1,3)+'-'+RIGH(pFONE,4)
CASE LEN(ALLT(pFONE))=10
lcretval='('+LEFT(pFONE,3)+') '+SUBS(pFONE,4,3)+'-'+RIGH(pFONE,4)
ENDC
RETU lcretval
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform