Jump to content
Sign in to follow this  
Nighthaze

pixelsearch help

Recommended Posts

Nighthaze

how do i know what coords to make the rectangle? Im trying to get it so that if my certain color armor is not found, it will click the left arrow to select the character with the right armor. is there a way to scan the whole window instead of a rectangle?

heres my code:

Run("C:\Program Files\Guild Wars\Gw.exe")
Sleep(9000)
WinWaitActive("Guild Wars")
Send("PASSWORD")
Send("{ENTER}")
Sleep(4000)
PixelSearch(393, 24, 611, 37, 0xB67E53, 1)
If Not @error Then
    Send("{ENTER}")
    Sleep(6000)
Send("m")
MouseClickDrag("right", 521, 413, 494, 389, 75)
MouseClick("left" , 430, 457, 2, 1)
Sleep(9000)
    Endif
If @error Then
Send("{LEFT}")
Sleep(2000)
Send("{ENTER}")
Sleep(6000)
Send("m")
MouseClickDrag("right", 521, 413, 494, 389, 75)
MouseClick("left" , 430, 457, 2, 1)
Sleep(9000)
Endif
Edited by Nighthaze

Share this post


Link to post
Share on other sites
ofLight

Opt("PixelCoordMode", 2)

or

$WinLoc = WinGetPos("")
PixelSearch($WinLoc[0], $WinLoc[1],$WinLoc[0]+$WinLoc[2],$WinLoc[1]+$WinLoc[3], 0xB67E53, 1)

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites
Nighthaze

this will tell it to press left if it doesnt see the color, right?

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  

×