Jump to content
Sign in to follow this  
BeautifulWar

Help with my script!

Recommended Posts

BeautifulWar

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 by BeautifulWar

Share this post


Link to post
Share on other sites
jaberwacky

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.