Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v2) • Re: CheckColor / WaitColor - Color names of HEX color

$
0
0
This code work! (with Sleep 1000)

CODE:

#Requires Autohotkey 2.0
#SingleInstance Force
CoordMode 'Pixel', 'Window'

Run 'notepad.exe',,, &tstPID
WinWaitActive 'ahk_pid ' tstPID
Sleep 1000
Color := PixelGetColor( 40, 20 )
MsgBox '(0x87C5D2) => ' Color



This code doesn't work (without Sleep)

CODE:

#Requires Autohotkey 2.0
#SingleInstance Force
CoordMode 'Pixel', 'Window'

Run 'notepad.exe',,, &tstPID
WinWaitActive 'ahk_pid ' tstPID
Color := PixelGetColor( 40, 20 )
MsgBox '(0x87C5D2) => ' Color


Is there something I don't understand with "WinWait"?
Is there another way to know that the window is active?

Statistics: Posted by Albireo — Today, 17:52



Viewing all articles
Browse latest Browse all 579

Trending Articles