Thanks
Here the code that i tried copying
Code: Select all
#SingleInstance,Force
SetWorkingDir,%A_ScriptDir%
CoordMode,Mouse,screen
CoordMode,Pixel,screem
Gui,2:+AlwaysOnTop
Gui,2:Add,Button,x10 y10 w200 h20 gFind_Image,Find Image
Gui,2:Add,Button,x10 w200 h20 gGui_1,Load / Reload Image
Gui,2:Add,Text,x10 ,Press F13 to Stop
Gui,2:Show,x1000 y200
return
2GuiClose:
ExitApp
Find_Image:
;ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
ImageSearch, Loc_X, Loc_Y, 0, 0, A_ScreenWidth, A_Screen Height ,example.PNG
if(ErrorLevel=2)
{
Msgbox,ErrorLevel = 2'nSomething is Wrong
}
else if(ErrorLevel=1)
{
TrayTip,,Image Not Found,2
}
else if(ErrorLevel=0)
{
TrayTip,,*******************'nWe found the image'n**********************
}
return
GuiContextMenu:
Gui,1:Destroy
return
Move_Window:
Random,New_X,0,A_ScreenWidth-posw
Random,New_Y,0,A_ScreenHeight-posw
Gui,1:Show,x%New_x% y%new_y%
return
Gui_1()
{
global
Gui,1:Destroy
Gui,1:Margin,0,0
Gui,1:+AlwaysOnTop - Caption +Owner2
Gui,1:Add,Picture,x0 y0 vClip_Picture gMove_windown,example.PNG
GuiControlGet,Pos,1:Pos,Clip_Picture
Gui,1:Show, AutoSize
}
Numpad1::
stop=-1
return
*ESC::ExitApp