Jump to content

autoit command recognition help


marselo
 Share

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...