Okay so this is what I've got so far. What I'm wanting this to do is check one pixel for a color (constantly check) then if the color is found there make f2 =end. That works. But then if the color is not there I want it to check another spot (constantly) and if the color is found there then I want f2=end. I cant seem to understand how to format this. Thanks for any help sir.
Code: Select all
#persistent
SetTitleMatchMode, RegEx
WinWait, % winTitle := "CMS Reporting"
SetTimer, Check, 200
Loop
{
WinWaitNotActive
If WinExist()
If WinExist("Label") || WinExist("Master")
WinActivate, CMS Reporting
}
Check:
WinGet, WinState, MinMax, %winTitle%
If (WinState = 1) ; Maximized
{
CoordMode, Pixel, Screen
PixelGetColor, color, 1329, 487 ; spot1
}
#If (color = 0x00FF00)
F2::End ; allow numbers
#Else if (color != 0x00FF00)
PixelGetColor, color, 1343, 484 ; spot2
#If (color = 0x00FF00)
F2::End ; allow numbers
#If (color != 0x00FF00) ; block numbers
1::
2::
3::
4::
5::
6::
7::
8::
9::
0::
;Numpad1::
;Numpad2::
;Numpad3::
;Numpad4::
;Numpad5::
;Numpad6::
;Numpad7::
;Numpad8::
;Numpad9::
;Numpad0::