Sign in to follow this  
Followers 0
mirko1

Pixelsearch and mouse control

2 posts in this topic

I am new at this. If somebody can help it would greatly be appreciated.

I am trying to find the color(yellow) in pre-defined rectangle and once found to left click on it.

I tried the following

$coord = PixelSearch( 195, 336, 232, 258, 0xffff00, 21 )

MouseClick( "left", $coord[0], $coord[1] )

I am getting the following error:

MouseClick( "left", $coord/\ERROR

Error: Subscript used with non-Array variable

Can somebody tell me what am I doing wrong, and how to fix it?

Thank you

Share this post


Link to post
Share on other sites



$coord = PixelSearch( 195, 336, 232, 258, 0xffff00, 21 )
If @error = 0 Then MouseClick( "left", $coord[0], $coord[1] )


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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