>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.