Jump to content

Mouse position


 Share

Recommended Posts

So i want to make my comp to scan for a color then move the mouse to that color + some pixels,

so if he found the color, the mouse needs to be a few pixels lower, i tryed this:

$test1 = PixelSearch (some coords....not important for now, some color...)
MouseMove ($test1[0], $test1[1]+20, 2)

I also tryed this:

$test1 = PixelSearch (some coords....not important for now, some color...)
$test2 = $test[1] + 20
MouseMove ($test1[0], $test2[1], 2)

they both don't work for me, mouse goes to the color, not few pixels below. If any-one knows how to do this, please tell.

Thanks

Link to comment
Share on other sites

$offsetx = 0
$offsety = 20

while 1

$search = PixelSearch (some coords....not important for now, some color...)
If ubound($search) > 1 then
     MouseClick("right", $search[0] + $offsetx, $search[1] + $offsety, 1, 1)
endif

wend

Edited by jokke
UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
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...