Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Firing a character at a comm port
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00895009
Message ID:
00895400
Views:
15
Thanks Jim, but I have found a simpler way:

mPort = "COM2"
*// Open the port 11 is write only unbuffered
nHandle = Fopen(mPort,11)
IF nHandle < 0
=MessageBox(mPort+" Is either unavailable or invalid. Could not open the port ",48,"")
ENDIF

nBytes = Fwrite(nHandle,"X")
IF nBytes < 1
=MessageBox("The character did not write to the port successfully ",48,"")
ELSE
WAIT WINDOW NOWAIT "The X character was fired at "+mPort
ENDIF

=Fclose(nHandle)

Cheers
John
To move a mountain start with the smallest stone
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform