Jump to content
Sign in to follow this  
Thract

Pixel Detection

Recommended Posts

Thract

Sorry im trying to learn this stuff, im like a noob at this stuff, but how do you go about making something where you search for a certain color, move your mouse there and wait until the color changes, and once it does change, you click.

Help is much appreciated, thanks

Share this post


Link to post
Share on other sites
Thract

Oops i posted it in the wrong area, where's the delete button, wanted it to be in General Help/Support

Edited by Thract

Share this post


Link to post
Share on other sites
Yoriz

Sorry im trying to learn this stuff, im like a noob at this stuff, but how do you go about making something where you search for a certain color(PixelSearch), move your mouse there(MouseMove)and wait until(Do...Until) the color changes(PixelGetColor), and once it does change, you click(MouseClick).

Help is much appreciated, thanks

Hi welcome to the forum, look in the helpfile at the functions i put in brackets.


GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

Share this post


Link to post
Share on other sites
Thract

Hi welcome to the forum, look in the helpfile at the functions i put in brackets.

The Do/Until thing was what i needed, thanks a lot

Share this post


Link to post
Share on other sites
gfcaim

This is some code I used myself to achieve the same thing...

$xPos=435
    $yPos=230
    $Found=false
    Do
        mousemove($xPos,$yPos)
        $coord=PixelSearch($xPos,$ypos,$xPos,$yPos,0xFFFFCC)
        if isarray($coord) then
            $Found=true
        Else
            $yPos=$yPos+1
            if $yPos=300 then
                msgbox(0,"SciTE","Project link not found!")
                Exit
            endif
        endif
    Until $found=true
    mouseclick("main",$xPos,$ypos+6,1)

[font="Comic Sans MS"]"I'm not usually a praying man, but if you are up there, please save me Superman!" (Homer J. Simpson)[/font]

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.