This code work! (with Sleep 1000)
This code doesn't work (without Sleep)
Is there something I don't understand with "WinWait"?
Is there another way to know that the window is active?
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