marselo Posted October 11, 2009 Share Posted October 11, 2009 iam making a program to send commands to the pc through Messenger. but i need help to get the commands recognized for example i want to send mousemove(480,431) so how will the computer recognize the command as mousemove(x,y) as x=480 , y=431 ? Link to comment Share on other sites More sharing options...
martin Posted October 11, 2009 Share Posted October 11, 2009 Easiest way is to read the line into a variable, say $nextline then Execute($nextline) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
marselo Posted October 11, 2009 Author Share Posted October 11, 2009 nice,this will work. but how can i do the same but with changing the command name?? for example: mouseto,[x],[y] mousemove([x],[y]) ??? Link to comment Share on other sites More sharing options...
monoceres Posted October 11, 2009 Share Posted October 11, 2009 First of all, executing user input is very, very unsecure. Even though in this case it might be okay, make it a rule to never do it! Lets for example play with the thought I figure out how to send these commands to you over messenger, I would have complete control over your computer. Instead, why not build a simple parser? Much, much more secure. Here's a simple example: #include <array.au3> $Input="mouseto,10,10" $Params=StringSplit($Input,",",2) $Function=$Params[0] _ArrayDelete($Params,0) Switch $Function Case "mouseto" MouseMove($Params[0],$Params[1]) EndSwitch Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now