Error checking for 2 different pixel checks

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Birdy905
Posts: 12
Joined: 22 Feb 2017, 13:35

Error checking for 2 different pixel checks

14 Dec 2017, 12:24

I am trying to incorporate two different means of pixel color checking in one statement. I'm not sure it's possible however. What I'm trying to accomplish is this.

Code: Select all

Pixelsearch, px, py, 842, 996, 896, 996, 0xFFFFFF, Fast 
Pixelgetcolor, Color, 837, 963
    if ((errorlevel = 0) AND (Color = 0x1FB9FF))
    {
        Sendinput {F5}
	break
			            }
User avatar
KuroiLight
Posts: 327
Joined: 12 Apr 2015, 20:24
Contact:

Re: Error checking for 2 different pixel checks

14 Dec 2017, 14:29

maybe?

Code: Select all

While(!FindPixel())
    Send, {F5}
return

FindPixel() {
    Pixelsearch, px, py, 842, 996, 896, 996, 0xFFFFFF, Fast
    if(ErrorLevel) {
        Pixelgetcolor, Color, 837, 963
        if(ErrorLevel and Color != 0x1FB9FF)
            return false
    }
    return true
}
Windows 10, Ryzen 1600, 16GB G.Skill DDR4, 8GB RX 480 | [MyScripts][MySublimeSettings] [Unlicense][MIT License]
01/24/18
[/color]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: w_i_k_i_d and 308 guests