FindText - Capture screen image into text and then find it

Post your working scripts, libraries and tools
sigartrader
Posts: 3
Joined: 01 Feb 2018, 20:34

Re: FindText - Capture screen image into text and then find it  Topic is solved

09 Feb 2018, 14:27

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus



on this part
; MsgBox, 4096,, % "Time:`t" (A_TickCount-t1) " ms`n`n"
; . "Pos:`t" X ", " Y "`n`n"
; . "Result:`t" (ok ? "Up Arrow Found !":"Up Arrow Not Found !"), 3
MouseMove, X, Y
Click, 822, 400
sleep 3000
Click, 1135, 339
return

i try to eliminate message box, then after text/image is found, script will right click mouse at Click, 822, 400 then sleep 3 seconds then right cick again at Click, 1135, 339

is there something wrong, need help please, thanks
pedroabs
Posts: 3
Joined: 04 Oct 2017, 23:09

Re: FindText - Capture screen image into text and then find it

14 Feb 2018, 03:28

I am new to coding but I think this should be the code that you need.




t1:=A_TickCount

Text:="|<Up Arrow>*70$11.yTsTUS0M0004MMllrXz7yDwT"

if (ok:=FindText(1099, 559, 150000, 150000, 0, 0, Text))
{
CoordMode, Mouse
X:=ok.1.1, Y:=ok.1.2, W:=ok.1.3, H:=ok.1.4, Comment:=ok.1.5, X+=W//2, Y+=H//2
; Click, %X%, %Y%
Click, right, 822, 400
sleep 3000
Click, right, 1135, 339
return
}

; MsgBox, 4096,, % "Time:`t" (A_TickCount-t1) " ms`n`n"
; . "Pos:`t" X ", " Y "`n`n"
; . "Result:`t" (ok ? "Up Arrow Found !":"Up Arrow Not Found !"), 3
MouseMove, X, Y
feiyue
Posts: 65
Joined: 08 Aug 2014, 04:08

Re: FindText - Capture screen image into text and then find it

16 Feb 2018, 16:36

Updated to the v5.7 version, I changed the way to capture,
Before, click the left button of the mouse, and then move the mouse out of 100 pixels.
Now, press down the right button of the mouse, and then move a certain distance and release the right button.
In addition, I updated the "Capture Image To Text" window,
allowing the use of tags to split the text at one time and generate multiple text libraries.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 15 guests