Keydowns during Socket Read/Writes

Camm Camm29 at tesco.net
Tue Feb 8 15:42:27 CST 2011


Can anybody see the problem with using "Keys" whilst using socket commands.

I have tried KeyUp , KeyDown , RawKeys etc they work okay except when trying
to write to socket

 

Open socket to "127.0.0.1:8090" with message "ClientConnected"

         

  on ClientConnected pSocket

        write "Hello" & crlf to socket pSocket

        read from socket pSocket until crlf with message "ReceivedMessage"

         end ClientConnected

          

        on ReceivedMessage pSocket tdata

           read from socket pSocket until crlf with message
"ReceivedMessage"

           put number of items in tdata into NumItems

           repeat with y=1 to NumItems

              put  char 3 to 4 of item y of tdata into a

              delete char 1 to 5 of item y of tdata

              put item y of ToUpper(tdata) into line a of fld XYZ

           end repeat

           else

           end if

THIS WORKS >>>>>> write "Arn.Resp:5015=1:" & crlf  to socket pSocket

 

THIS WORKS >>>>>> if controlKey is down the put  "Arn.Resp:5015=1:" into fld
XYZ

 

THIS DOES NOT >>>>> if controlKey() is down then write "Arn.Resp:5015=1:" &
crlf  to socket pSocket

                        end ReceivedMessage    

 

 

Best Regards

Camm



More information about the use-livecode mailing list