FindText - Capture screen image into text and then find it

Post your working scripts, libraries and tools
nwr425
Posts: 2
Joined: 08 Aug 2018, 15:41

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

11 Aug 2018, 03:46

Big shout out to @feiyue -- Thanks for this

Curious if this theory is possible:
Image1 is currently being used to skip between different loops.

What I would like to do with Image2 is the following:
If Image2 is ever seen at any point in my script; sleep for a few seconds, navigate to a different page, then recycle my loops.

Tried something like this at the start of my script, no luck:

Code: [Select all] [Download] GeSHi © Codebox Plus

;~ if (ok:=FindText2(0,0,150000,150000,0,0,"|<blocked>*114$68.TxzzzvzzzrzHyTzzwzzztz0zbzzzDzzyTn9tyzvnzrwbwk6S3sAtkQ1y0Nb4QHAtWATVD9bmTkQwbbwnmNwbw709tzAwaT9z1k2STnC9bmTnATbbwk6A1k4lU81zA3nUy3CQ30Tnzzyzvzzrxzzs"))
;~ sleep, 180000
;~ pwb.Navigate("www.google.com") ;Navigate to URL
;~ while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
;~ Sleep, 100
;~ goto Main


Should I wrote this a different way or maybe this?

Code: [Select all] [Download] GeSHi © Codebox Plus

if (ok:=FindText2(0,0,150000,150000,0,0,"|<blocked>*114$68.TxzzzvzzzrzHyTzzwzzztz0zbzzzDzzyTn9tyzvnzrwbwk6S3sAtkQ1y0Nb4QHAtWATVD9bmTkQwbbwnmNwbw709tzAwaT9z1k2STnC9bmTnATbbwk6A1k4lU81zA3nUy3CQ30Tnzzyzvzzrxzzs"))
{
sleep, 180000
pwb.Navigate("www.google.com") ;Navigate to URL
while pwb.busy or pwb.ReadyState != 4 ;Wait for page to load
Sleep, 100
goto Main
}
nwr425
Posts: 2
Joined: 08 Aug 2018, 15:41

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

12 Aug 2018, 15:02

Failing to find the following 'Image1' from webpage using Grey2Two and Auto. Any ideas?

Image1:
Image

Webpage View:
yes forum.PNG
yes forum.PNG (3.45 KiB) Viewed 144 times
Attachments
forum post.PNG
(24.07 KiB) Not downloaded yet
Irrelephant
Posts: 5
Joined: 13 Jun 2018, 07:13

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

13 Aug 2018, 02:45

I would narrow it down to the Yes and try it again ...
feiyue
Posts: 103
Joined: 08 Aug 2014, 04:08

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

13 Aug 2018, 23:34

@nwr425, Many positions on the web will change color when the mouse moves there. :D
So when capturing the picture, hold the right button first and then move to other places to release the right button.
NewJohn45
Posts: 2
Joined: 16 Aug 2018, 12:19

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

16 Aug 2018, 12:24

Thanks for creating such an awesome tool

It works perfectly when I try it with one image with a fast response time (70ms)

But I want to have a script that uses multiple images and now it has a 7000 response time which is far too slow, is it my poor coding? How can I make the script run fast, would it be faster to use ImageSearch for multiple images?

Here is my code. I want the script to continually loop for a long time, when it sees an image it presses the key 5

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

feiyue
Posts: 103
Joined: 08 Aug 2014, 04:08

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

16 Aug 2018, 12:43

@NewJohn45, I think you can improve in this way:
1, combinatorial search can avoid multiple screenshots.
2, narrowing the search range can significantly speed up the process.
Set 150 corresponds to a range of 301 * 301 pixels.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

bordop
Posts: 1
Joined: 03 Jun 2018, 23:03

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

16 Aug 2018, 12:50

Just want to thank you for this incredible utility, I use it all the time!
NewJohn45
Posts: 2
Joined: 16 Aug 2018, 12:19

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

16 Aug 2018, 12:54

Thank you so much, it works amazingly fast!
bugsbunny
Posts: 2
Joined: 13 Aug 2018, 04:28

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

17 Aug 2018, 14:40

how can i make the script search only the center ?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: hoppfrosch and 7 guests