;//Mon, Jan 22, 2007 --- 1/22/07, 1:19:19am #SingleInstance force #Include Base.ahi test_img=%A_ScriptDir%\Base.ahi - ImageWait - Test.png IfNotExist, %test_img% { msgbox, 36, , Download test image to...`n`n%test_img% IfMsgBox, Yes URLDownloadToFile, http://r.secsrv.net/LC.png, %test_img% } CoordMode, Pixel SetMouseDelay, -1 SS_NOPREFIX=0x80 Gui, 2:Default Gui, +Resize Gui, Color, 8a2be2 A_GuiMargin=6 Gui, Margin, %A_GuiMargin%, %A_GuiMargin% Gui, Font, s19 Gui, Add, Text, vmsg1 ccc80ff BackgroundTrans center w519 %SS_NOPREFIX%, (LTrim This window provides the image to search for...try with this window visible & not visible for testing... ) Gui, Add, Pic, vImage, %test_img% Gui, Add, Text, vmsg2 ccc80ff BackgroundTrans center w519 %SS_NOPREFIX%, (LTrim You should minimize this window...so it don't find the image right away... ) Gui, Font Gui, Show, , Where's that image? - %A_ScriptName% Gui, +LastFoundExist Gui, 1:Default msgbox, 64, , Press OK to begin search... 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, ImageWait...looking for test image...`n`nEsc to abort Gui, Font Gui, Show, NA Gui, +LastFoundExist WinGetPos, , , , h WinMove, , A_ScreenHeightWA()-h-19 tsb:=A_TickCount ImageWait(x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, test_img, 19019) tsa:=A_TickCount if (errorlevel) { ErrorExit("ImageWait Timeout waiting for Test image..." 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 }