The following code checks for a specific color in the active window and if the color is not found it presses Page Up.
The pixel would be changing constantly even if the window is not focused.
What I want is for the script to keeping checking for that said pixelcolor in a set window even if it's not my current folder/program maximized(focused) and send the PageUp in the set window.
Example:
Code: Select all
!^l::
#MaxThreadsPerHotkey 1
if KeepWinZRunning
{
KeepWinZRunning := false
return
}
; Otherwise:
KeepWinZRunning := true
Loop
{
PixelSearch, Px, Py, 1133, 320, 1244, 338, 0x508BB0, 3, Fast
if (Errorlevel = 1){
Send, {PgUp}
Sleep, 2025
}
if not KeepWinZRunning
break
}
KeepWinZRunning := false
return
!l::
Pause