Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Telephone Dialler
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00172545
Message ID:
00172682
Views:
27
>>Does anyone know of a telephone dialler add-on for VFP5?
>
>Use de MSCOMM32.OCX activeX control. You find a lot of examples on internet

Hi Plinio.

If you want to make VFP dial a given telephone number, you can code it yourself. You don't need an add on. Just SET LIBRARY TO FOXTOOLS.FLL ADDITIVE and use code something like this:
lcNum2Dial = ALLTRIM(THISFORM.TxtPrefix.Value)
IF LEFT(ALLTRIM(THISFORM.TxtPhone.Value),3) = ALLTRIM(THISFORM.TxtLocalArea.Value)
   lcNum2Dial = lcNum2Dial + RIGHT(ALLTRIM(THISFORM.TxtPhone.Value),7)
ELSE
   lcNum2Dial = lcNum2Dial + "1" + ALLTRIM(THISFORM.TxtPhone.Value)
ENDIF
lcNum2Dial = lcNum2Dial + ALLTRIM(THISFORM.TxtSuffix.Value)

lccomport=THISFORM.cboComPort.Value
lcdstring = "ATDT " + lcNum2Dial + 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))

=MESSAGEBOX('Dialing '+ALLTRIM(lcNum2Dial)+CHR(13)+CHR(13)+;
            "Pick up the phone and press any key                  ",64, APPNAME_LOC)

lcdstring=CHR(10)+CHR(13)+CHR(10)+CHR(13)

=CallFn(WriteComm, lnport, lcdstring, len(lcdstring))
=CallFn(CloseComm, lnport)
Or am I not understanding what you really want to do here?

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform