Jump to content

How Can I Use A Variable With Mousemove()


Guest mcdunkey
 Share

Recommended Posts

Mouse move takes three parameters, so you need to supply three variables.

$a = 100

$b = 100

$c = 0

MouseMove($a, $b, $c)

Otherwise, you need to create a user-defined function that parses the string "100, 100, 0")

$A = "100, 100, 0"
_myMouseMove($A)
Func _myMouseMove($arg)
   $tmp = StringSplit($arg, ",")
   If UBound($tmp) = 4 Then MouseMove($tmp[1], $tmp[2], $tmp[3])
EndFunc

I hope that makes sense.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

$a is only one variable, even though it contains all the info you want. Extract it with a function if you like.

$A ="100, 100, 0"
mmove($A)


func mmove($a)
$array=Stringsplit($a,",")
if Ubound($array)=4 then mousemove($array[1],$array[2],$array[3])
if Ubound($array)=3 then mousemove($array[1],$array[2])
endfunc

AutoIt3, the MACGYVER Pocket Knife for computers.

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...