Jump to content
Sign in to follow this  
Guest mcdunkey

How Can I Use A Variable With Mousemove()

Recommended Posts

Guest mcdunkey

i have

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


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"
Func _myMouseMove($arg)
   $tmp = StringSplit($arg, ",")
   If UBound($tmp) = 4 Then MouseMove($tmp[1], $tmp[2], $tmp[3])

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"

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...