;//Mon, Jan 22, 2007 --- 1/22/07, 1:19:19am #SingleInstance force #Include Base.ahi test_pixel_color=8a2be2 ;//test_pixel_shades= ;//test_pixel_opts=Slow BGR ;//test_pixel_opts=BGR CoordMode, Pixel SetMouseDelay, -1 SS_NOPREFIX=0x80 Gui, 2:Default Gui, +Resize Gui, Color, %test_pixel_color% A_GuiMargin=6 Gui, Margin, %A_GuiMargin%, %A_GuiMargin% Gui, Font, s19 Gui, Add, Text, vColor ccc80ff BackgroundTrans center w519 %SS_NOPREFIX%, (LTrim This window provides the color to search for...try with this window visible & not visible for testing... You should minimize this window...so it don't find the color right away... ) Gui, Font Gui, Show, , Where's that color? - %A_ScriptName% Gui, +LastFoundExist WinMove, , A_ScreenHeight-319 Gui, 1:Default msgbox, 64, , Press OK to begin search... ;//This GUI is a status message for this example...make sure it don't cover where you are searching!... Gui, -Caption +AlwaysOnTop Gui, Color, Black A_GuiMargin=6 Gui, Margin, %A_GuiMargin%, %A_GuiMargin% Gui, Font, s19 Gui, Add, Text, vStatus c8080ff BackgroundTrans center, PixelWait...looking for test pixel...`n`nEsc to abort Gui, Font Gui, Show tsb:=A_TickCount PixelWait(x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, test_pixel_color, test_pixel_shades, test_pixel_opts, 19019) tsa:=A_TickCount if (errorlevel) { ErrorExit("PixelWait Timeout waiting for Test pixel..." tsa-tsb) } GuiControl, , Status, (LTrim Found it! x(%x%) y(%y%) ) Sleep, 5019 ExitApp return Esc:: GuiEscape: GuiClose: 2GuiEscape: 2GuiClose: ExitApp ErrorExit(p_msg) { Global Gui, Destroy msgbox, 16, , %p_msg% ExitApp }