BeautifulWar Posted July 24, 2011 Share Posted July 24, 2011 (edited) Hello, I'm new here and i need help fixing my script. (Side note, i just started AutoIt yesterday) Anyways the script below isn't performing the commands i want it to do. $start = 1 $coor = PixelSearch(415, 334, 461, 344, 0xC94336, 1, 1) While $start = 1 Sleep(5000) If IsArray($coor) = True Then MouseClick("left", 520, 480, 1) EndIf WEnd What i want to do is, i want this script to search if the specified color is there. If it is, then the will be mouse programmed to click on a certain coordinate. I also want this command to loop, so it will constantly check for that color, and click that certain coordinate. Edited July 24, 2011 by BeautifulWar Link to comment Share on other sites More sharing options...
jaberwacky Posted July 24, 2011 Share Posted July 24, 2011 Try this here code: While True Sleep(5000) $coor = PixelSearch(415, 334, 461, 344, 0xC94336, 1, 1) If IsArray($coor) Then MouseClick("left", 520, 480, 1) WEnd Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now