FindText working intermittently?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jvelella
Posts: 1
Joined: 18 Feb 2024, 10:18

FindText working intermittently?

18 Feb 2024, 10:31

So I use FindText to run a few clicks in my script, but for some reason it works one day, and not the next. Same laptop, same online program (No updates or anything that I know of) So I am wondering if there's a way to set the tolerance like image search has the *100 etc. I have about 60 different find texts to start jobs and do all the repetitive tasks, it seems to work amazing for a day then just stops the next day until I redo the capture and update the code, then works great again. Would changing the grey scale be that beneficial? I was having the same problem with image search so that's why I switched to find text, thought it fixed my problem but it has come back :(

Open to any and all ideas.

Code snippet from middle of my code:

Code: Select all

tryCount := 10
t1:=A_TickCount, Text:=X:=Y:=""
Loop % tryCount {

Text:="|<>*186$68.0400200000000000U000000wEsQw5kwLQCNYF8W1aNaMYI94OAUEU96952HzU848yFWzEYkM212MYMg49420UEY9691aFaX849aFWND4D7312CYMXk100000000000E0000000000Q0000000008"

if (ok:=FindText(X, Y, 816-150000, 683-150000, 816+150000, 683+150000, 0, 0, Text))
{
Sleep, 500
   FindText().Click(X, Y, "L")
   Sleep, 1000
   Break
}else{
if (tryCount > 0){
tryCount--
Sleep, 2000
}
}
}
if (tryCount < 1){
MsgBox, Error Finding Text

}
Try For i,v in ok  ; ok value can be get from ok:=FindText().ok
 if (i<=2)
  FindText().MouseTip(ok[i].x, ok[i].y)
[Mod edit: Moved topic from AHK v2 help since this is v1 code.]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: sxcar98 and 88 guests