if #IfWinActive 'xx' AND the pixel_color of this position is 123
Posted: 29 Dec 2017, 04:16
I want to apply several shortcuts to a IfWinActive condition plus a pixel color
I'm looking for something that would look like:
I know I could do that (bellow) but is there a shorter way?
I'm looking for something that would look like:
Code: Select all
If (WinActive ahk_exe abc.exe) and (PixelGetColor at 1359, 64 RGB is "0x85C78B")
^a::
msgbox yes
Code: Select all
#IfWinActive ahk_exe abc.exe
^a::
PixelGetColor mycolor, 1359, 64 RGB
if (color_sync_button="0x85C78B")
{
; dont do anything
return
}
else
{
msgbox yes
return
}
^b::
PixelGetColor mycolor, 1359, 64 RGB
if (color_sync_button="0x85C78B")
{
; dont do anything
return
}
else
{
msgbox yes
return
}
etc.