Sign in to follow this  
Followers 0
Guest mcdunkey

How Can I Use A Variable With Mousemove()

5 posts in this topic

i have

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

mousemove($A)

but its not working, what do i need to do to this

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Dang Cyber beat me to it, Scarry how alike we think at times.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
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
Sign in to follow this  
Followers 0