how to find two pixelcolors ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
adi
Posts: 15
Joined: 02 Jul 2018, 07:12

how to find two pixelcolors ?

12 Jul 2018, 12:05

Hello
I need to add to this code
one more color 0x080C0C

Can anyone help me ? ;)

~LButton::
while GetKeyState("LButton")
{
mousegetpos, xx, yy
PixelSearch, Px, Py, xx-10, yy-10, xx+10, yy+10, 0x29625F, 3, Fast
mousemove %Px%, %Py%, 0

}
return
Qysh
Posts: 143
Joined: 24 Apr 2018, 09:16

Re: how to find two pixelcolors ?

13 Jul 2018, 06:00

adi wrote:Hello
I need to add to this code
one more color 0x080C0C

Can anyone help me ? ;)

~LButton::
while GetKeyState("LButton")
{
mousegetpos, xx, yy
PixelSearch, Px, Py, xx-10, yy-10, xx+10, yy+10, 0x29625F, 3, Fast
mousemove %Px%, %Py%, 0

}
return

Code: Select all

~LButton::
while GetKeyState("LButton")
{
mousegetpos, xx, yy
PixelSearch, Px, Py, xx-10, yy-10, xx+10, yy+10, 0x29625F, 3, Fast
mousemove %Px%, %Py%, 0
PixelSearch, Px2, Py2, xx-10, yy-10, xx+10, yy+10, 0x080C0C, 3, Fast
mousemove %Px2%, %Py2%, 0
}
return
adi
Posts: 15
Joined: 02 Jul 2018, 07:12

Re: how to find two pixelcolors ?

13 Jul 2018, 09:25

this code search only one colors :)
adi
Posts: 15
Joined: 02 Jul 2018, 07:12

Re: how to find two pixelcolors ?

13 Jul 2018, 11:51

ok this code search two colors ,how did 3colors or 4colors ? :)

~LButton::
while GetKeyState("LButton")
{
mousegetpos, xx, yy
PixelSearch, Px, Py, xx-10, yy-10, xx+10, yy+10, 0x29625F, 3, Fast
if (ErrorLevel != 0)
PixelSearch, Px, Py, xx-10, yy-10, xx+10, yy+10, 0x0D2321, 3, Fast ; do this ONLY if previous search failed
if (ErrorLevel = 0)
NumberofPlayers++
mousemove %Px%, %Py%, 0
}
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 322 guests