Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make phone call from VFP
Message
De
20/02/1999 00:53:23
 
 
À
19/02/1999 22:55:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00189606
Message ID:
00189612
Vues:
8
>Hi everyone,
>
>i had a database for record my client file, its inculed their photo nubmer. can i make a button call "Dail". I just click the "Dail" button, and the system will help me to dail out. At last i can store the connet time "00:05:33" to a variable.
>

You can access a modem and dial the phone, and then time the duration of the call by recording the starting and ending times as datetime variables. the dureation in seconds is the difference between the two,

>What is the command in the "Dail" CLICK EVENT, and where to get the connect time.

There is no native VFP command to dial the modem for you; you can use an add-on ActiveX control to do this for you. Your best bet would be to purchase a TAPI (Telephony API) ActiveX component to manage the call for you. You could also attempt to do direct manipulation of the modem via a serial port using the MSCOMM32.OCX ActiveX control; this requires a good deal more work to accomplish, and requires at least some knowledge of the command set for the specific make and model of modem in use. You can download examples of using the MSCOMM32.OCX control from the File Section of UT - click on the filing cabinent icon to get there, and then do a search on MSCOMM.

A TAPI control would require less effort to accomplish the same task, and might be able to automatically record call duration and the like as a part of its services. TAPI components are not free; a good vendor for TAPI controls (and a wide range of other add-ons to Visual FoxPro in general is Component Source.

Call duration is easy to compute. You can save the current date and time in a DateTime type variable, and subtracting one DateTime variable from another will return a number representing the number of seconds difference. For example:

tStartTime = DATETIME()
*
* do some stuff
*
nSecondsDuration = DATETIME() - tStartTime

You could then store the variable nSecondsDuration to a numeric field in a table, or you could compute hours, minutes and seconds and build a string, saving the string to a character field in a table.

Good luck!

Ed
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform