here's one that works based on the colour of the pixel just don't put a window in front of it (you will get a 10 minute)
if the pixel is not black it presses k
made editions to one i found ages ago i cant take full credit
CoordMode, Pixel
Pause
Loop {
RetryScript:
WinGetPos ,PosX, PosY,,,Adobe Flash Player
PixelGetColor, color, PosX+100, PosY+100
IfEqual, color, 0x000000
{
Goto, RetryScript
} else {
controlSend ,,k,Adobe Flash Player
sleep 500
}
}
F10::Pause