General information
Category:
Third party products
Glen,
I have been following this topic for educational purposes, but something constantly eludes me. It is embarassing to be sure, but here goes. . .
Throughout *all* of the examples (from everyone) there is lots and lots of Property setting but never anything being 'executed' (except WAIT). Am I missing some "convention" used in describing these thing (I am newish to these Internet facilities) or is it so obvious that anyone would know or???
Curiously,
Jim N.
>Hi Denis,
>
>Here is some code you can cut & paste into a .PRG, and DO the .PRG
>This will give you *some* feedback on the modem status. If the modem fails to reset, try the alternate line of code that is commented out.
>This code runs on my PC on VFP 5.0 and Windows 95.
>
>***** Top Code*****
>ComForm = CREATEOBJECT('Form')
>ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
>ComForm.Testcom.CommPort = 2
>ComForm.Testcom.Settings = "9600,N,8,1"
>ComForm.Testcom.PortOpen = .T.
>ComForm.Testcom.Sthreshold=1
>ComForm.Testcom.InputLen=0
>
>
>* standard modem reset
>ComForm.Testcom.OUTPUT="AT&F"+CHR(13)
>
>* US robotics and some other FAX modem reset
>*ComForm.Testcom.OUTPUT="AT&F1"+CHR(13)
>
>wait window "modem reset" timeout 2
>cTestData=ComForm.Testcom.INPUT
>IF ! "OK"$cTestData
> wait window "Modem Failed to reset"
>ENDIF
>
>ComForm.Testcom.OUTPUT="ATE1V1&C1&D3S7=30X4"+CHR(13)
>wait window "modem initialize" timeout 2
>cTestData=ComForm.Testcom.INPUT
>IF ! "OK"$cTestData
> wait window "Modem Failed to initialize"
>ENDIF
>ComForm.Testcom.Output = "ATDP3716660" + chr(13)
>wait window "dialing - press any key to exit"
>
>ComForm.Testcom.DTREnable=.F.
>wait window "disconnecting" timeout 3
>ComForm.Testcom.DTREnable=.T.
>ComForm.Testcom.PortOpen = .F.
>***** End Code ***
>
>HTH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only