Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modems
Message
De
15/09/2000 21:32:28
 
 
À
15/09/2000 18:01:58
Bill Drew
Independent Consultant
Chicago, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Modems
Divers
Thread ID:
00392011
Message ID:
00417231
Vues:
21
>I don't understand how to detect the "OK" returning from the modem. I have a USB modem and issue the following code through the MSCOMM32 control:
>
>thisform.olecontrol1.commport = 5
>thisform.olecontrol1.portopen = .t.
>thisform.olecontrol1.output = "ATZ"+CHR(13)

DECLARE Sleep IN WIN32API INEGER dwMs
=Sleep(2000) && wait 2 seconds

>x = thisform.olecontrol1.input
>thisform.olecontrol1.portopen = .f.
>=messageb(x)
>
>
>Is "input" the correct way to grab this response value? How would I "wait 2 seconds"?

Yes. You can also check the InputBufferCount property and only read it if there's something in the buffer - it returns 0 if nothing is here.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform