Code: Select all
While GetKeyState, E [, P]
{
PixelGetColor, color, 1508, 641
If (color = 563E76)
Send, E Up
}
[Mod action: Moved topic to v1 section. The main section is for v2.]
Code: Select all
While GetKeyState, E [, P]
{
PixelGetColor, color, 1508, 641
If (color = 563E76)
Send, E Up
}
Code: Select all
Send, E Up
Code: Select all
#Requires AutoHotkey v1.1.33
target := 0x763E56 ; Blue-Green-Red
x := 1508 ; Relative to active window
y := 641
$e::
MouseMove x, y
Send {e down}
Loop {
Sleep 50
PixelGetColor bgr, x, y
ToolTip % bgr
} Until (bgr = target)
Send {e up}
ToolTip
SoundBeep 1500
Return