Thanks got it working for my purposesSteveMylo wrote: ↑16 Jan 2022, 17:39Here is my script to help you. It searches around the mouse cursor in a loop every 22ms. It will search the Left side of the mouse 1st in a rectangle range of your choice, then the right side.
Once found, it will close the loop.
*Please NOTE... that the rectangle search range must be big enough to encapsulate the entire image. Also, do you have the new version of FINDTEXT? was updated last September. This script won't work unless you have the updated version.
If not then replace if (ok:=FindText(X, Y, with ====> if (ok:=FindText(0,0,Code: Select all
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr") ; add this on top of all your scripts if you need to click or search/click on different monitors. q:: Loop { sleep, 22 MouseGetPos, aX, aY Text:="|<>3E84C2-000000$4.F4F4F4F7zzv8U" if (ok:=FindText(X, Y, aX-300, aY-100, aX-100, aY+100, 0, 0, Text)) ; Left side search range rectangle { MouseMove, X, Y, 2 return } if (ok:=FindText(X, Y, aX+300, aY-100, aX+100, aY+100, 0, 0, Text)) Right side search range rectangle { MouseMove, X, Y, 2 return } } ; end loop return Esc:: Reload
(searches area left of mouse pointer finds image saves one axis and moves mouse to a combo of another presaved coordinates with one from image)
Code: Select all
CoordMode, Mouse
MouseGetPos, aX, aY
blockinput, on
CoordMode, relative
Mousegetpos, xx, yy
CoordMode, Mouse, Screen
sleep, 100
Text:="|<>*90$26.tyONyTYaTbtAjtwn3yTBkzXaSDw7bbs"
if (ok:=FindText(xx-1200, yy+2400, xx, yy+100, 0, 0, Text)) ; 150 can be adjusted by yourself
;första xx höger från mousep +, sista yy ner från mousep + (första yy - ger upp)
{
xx:=ok.1.1, yy:=ok.1.2, w:=ok.1.3, h:=ok.1.4
mousemove, xx+3.5, aY+0
click left
}
;sparar y och hittar image sparar där x flyttar ihop dom.
blockinput, off
return