Jump to content
Sign in to follow this  
SwordHunter4Ever

Pixelsearch, then click +38, -45 from that pixel?

Recommended Posts

SwordHunter4Ever

I have my computer look for a certain pixel color, when it finds it I need it to click above and to the right of that point.

Here is my code so far, any help would be great =]

$pixelSearch = PixelSearch( 0, 195, 1419, 875, 0x38D878 )
        If @error Then
            $i = $i + 1
                EndIf
        If Not @error Then
            MouseClick("left",$pixelSearch[0],$pixelSearch[1],1,0)
                $i = $i + 1
                    EndIf

As you can see I pixel search for a color.

If its not found then it adds 1 to my i value and repeats (this is done in a part of the script you can't see).

If it does find the value though it clicks exactly where that pixel is, however I want it to click +38, -45 from that position. how would I go about doing this?

If you could just edit my coding and repost it that would be great, this should be pretty simple but I must just be overlooking it or something :P

Thanks guys, - Derek.

Share this post


Link to post
Share on other sites
BrettF

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  

×