Can anybody who is good with Client / Server Sockets get a client to send some data to the server when a key is pressed on the clients keyboard ??
If it is possible please could you share or see if it is a bug . Best Regards Camm From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Alex Tweedly Sent: 08 February 2011 23:56 To: use-livecode@lists.runrev.com Subject: Re: Keydowns during Socket Read/Writes Also, your script has 'the' instead of 'then' (I know, just a typo), and it has "else" ... "end if" with no corresponding "if" to begin. Could I suggest that you include the complete working script, as copied/pasted from the script editor, then include the complete on-working script. (or include both working scripts ...) That way we are seeing all the script lines with minimal chance of misunderstanding. Thanks -- Alex. On 08/02/2011 23:41, Mark Schonewille wrote: > Hi Camm, > > What does "does not work" mean? You need to explain this, before we can help you. > > Additionally, > > if controlKey is down > > cannot work, but > > if controlKey() is down > if the controlKey is down > > can work (provided that you're pressing the control key). > > -- > Best regards, > > Mark Schonewille > > Economy-x-Talk Consulting and Software Engineering > Homepage: http://economy-x-talk.com > Twitter: http://twitter.com/xtalkprogrammer > KvK: 50277553 > > New: Download the Installer Maker Plugin 1.5 for LiveCode here http://qery.us/ce > > On 8 feb 2011, at 22:42, Camm wrote: > >> 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 > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _____ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1204 / Virus Database: 1435/3430 - Release Date: 02/08/11 _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode