Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2003 Server
Ok, it's Friday. Must be why I can't see the forest...
I can programmatically pass information correctly to a bluetooth device using this format (the format is the bluetooth device's programming language syntax):
lnBytes = thisform.zOcx.Send([! U1 GETVAR "bluetooth.authentication"]+CHR(13)+CHR(10))
That succeeds. However, if I type
! U1 GETVAR "bluetooth.authentication"
in a textbox and try this:
lnBytes = thisform.zOcx.Send(thisform.text1.value+CHR(13)+CHR(10))
it fails. So does passing single quotes or square brackets. I need to pass a value INSIDE double quotes taken from a value typed in the textbox and pass the double quotes in the string. Any ideas? What obvious thing am I missing this time? :o)
Remember the movie 2001? What was Dave's title?
I try to imagine what the computer ... what Foxpro ... is thinking. I look at the way it's acting. In this case, it's acting as if SOMEHOW it's delimiting the data in thisform.text1.value with quotes. Thus, when it hits a quote in the string, it thinks the string is finished.
Just a theory anyway.
What if we rearrange it slightly thus
where thisform.text1.value = "bluetooth.authentication"
(no quotes actually IN the data) and
lnBytes = thisform.zOcx.Send([! U1 GETVAR "] + thisform.text1.value + ["]+CHR(13)+CHR(10))
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement