Jump to content
Sign in to follow this  
Kulisha

When pixel color changes do...

Recommended Posts

Kulisha

Hi all,

I'm a newbie as you see. I'm trying to use autoit to execute the following action:

Check continuously the color of a pixel, as soon as it changes execute a mouseclick for example.

The loop should be executed several times a second.

Pretty basic I think, but I'm loosing a lot of time trying to make it succeed.

Thanks for any help!

Kulisha

Share this post


Link to post
Share on other sites
SmOke_N

Hi all,

I'm a newbie as you see. I'm trying to use autoit to execute the following action:

Check continuously the color of a pixel, as soon as it changes execute a mouseclick for example.

The loop should be executed several times a second.

Pretty basic I think, but I'm loosing a lot of time trying to make it succeed.

Thanks for any help!

Kulisha

$Color = 0xFFFFFF ; or whatever the color is
While $Color = 0xFFFFFF
    $Color = PixelGetColor($xCoord, $yCoord)
    Sleep(10)
WEnd
MouseClick(button, x, y, times, speed)
Anymore help than that you'll need to post what you've done that has waisted your time.

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.

Share this post


Link to post
Share on other sites
Kulisha

$Color = 0xFFFFFF ; or whatever the color is
While $Color = 0xFFFFFF
    $Color = PixelGetColor($xCoord, $yCoord)
    Sleep(10)
WEnd
MouseClick(button, x, y, times, speed)
Anymore help than that you'll need to post what you've done that has waisted your time.

Thanks a lot, that was fast!!!! By the way my script works as I needed....

:D:D

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.