Code: Select all
WinSet, AlwaysOnTop, Toggle, OpenOSRS - ahk_class SunAwtFrame ahk_exe OpenOSRS.exe ahk_id 0x160470 ahk_pid 14472
Sleep, 333
WinActivate, OpenOSRS - ahk_class SunAwtFrame ahk_exe OpenOSRS.exe ahk_id 0x160470 ahk_pid 14472
Sleep, 333
Loop
{
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 657, 417, 684, 438, C:\Users\lloyd\AppData\Roaming\MacroCreator\Screenshots\Screen_20210504123834.png
CenterImgSrchCoords("C:\Users\lloyd\AppData\Roaming\MacroCreator\Screenshots\Screen_20210504123834.png", FoundX, FoundY)
If ErrorLevel = 0
Click, %FoundX%, %FoundY% Left, 1
}
Until ErrorLevel = 0
If (ErrorLevel = 0)
{
}