Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Firing a character at a comm port
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00895009
Message ID:
00895400
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform