[*]The script terminates itself after process termination (I worked around this but using Run but I'm sure there's a more elegant way to do this lol)
[*]The pixel that it detects may not be on the correct window, I guess its the static background window so it will kill the wanted process anyway regardless of pixel changes. (I tried different CoordMode but still, the problem remains)
Here's my script:
Code: Select all
CoordMode, Pixel, Relative ;<-- forces the Pixel commands to use relative mode
; this will cause the coordinates to move around based on what window is active
; and where the window is on the screen
;CoordMode, Pixel, Screen ;<-- forces the pixel commands to use the full screen.
; In this mode the coordinates will be locked to the entire screen area and whatever
; window is under that screen location will be used for the color comparison.
While (GetColor(thisColor) = GetColor(thatColor))
continue
;Process,Close, vlc.exe
Run, "C:\Users\Bill\Desktop\script.exe"
Return
GetColor(X)
{
PixelGetColor, X, 351, 298
sleep 1000
Return X
}