FindText - Capture screen image into text and then find it

Post your working scripts, libraries and tools
DRocks
Posts: 23
Joined: 08 May 2018, 10:20

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

18 May 2018, 07:27

thats very impressive!

thank you so much :)
HBasalim
Posts: 1
Joined: 23 May 2018, 09:33

23 May 2018, 09:42

how to show critical msgbox when more than 1 text is found within the screen?
guest26789

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

31 May 2018, 13:13

I cannot get this to run, I copied the code in the first post to a new AHK file and ran it. I get a little magnifying glass in the toolbar, but it vanishes. Help me plz :)
I am using the latest AHK 32 bit version.
guest26789

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

01 Jun 2018, 16:46

I got it to work by going back one AHK release
Saiftey
Posts: 18
Joined: 08 May 2018, 18:30

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

02 Jun 2018, 19:59

FindText(X,Y,W,H,err0,err1,Text)

err1 is the character "0" fault-tolerant in percentage (0-1) Default 0.
err0 is the character "_" fault-tolerant in percentage.(0-1) Default 0.


Please explain. I have attempted to set the err0 and err1 values to 1, 2, 3, 4, 5 and many others assuming it meant "percentage" and even just 1% makes my picture go crazy when 1% shouldn't be doing that.

How do I increase the fault tolerant? Please provide an example - I have tried replacing err1 and err0 with actual small numbers 1-9 and it just makes my script match everything black and white.
feiyue
Posts: 96
Joined: 08 Aug 2014, 04:08

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

03 Jun 2018, 00:35

err1、err0 set 0.1 is 10%, 1 is 100%.
guest26789

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

04 Jun 2018, 09:01

Is there a way to make it only search a certain window? (or coordinates in a window?)
Saiftey
Posts: 18
Joined: 08 May 2018, 18:30

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

04 Jun 2018, 20:00

feiyue wrote:err1、err0 set 0.1 is 10%, 1 is 100%.


Ah, now that works better. Thanks lad. :bravo:
feiyue
Posts: 96
Joined: 08 Aug 2014, 04:08

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

05 Jun 2018, 05:18

guest26789 wrote:Is there a way to make it only search a certain window? (or coordinates in a window?)

WinGetPos, x, y, w, h, A
FindText(x+w//2,y+h//2,w//2,h//2,0,0,Text)
feiyue
Posts: 96
Joined: 08 Aug 2014, 04:08

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

08 Jun 2018, 13:45

I try to use GetDCEx and BitBlt to get background windows.
Unfortunately, it failed on Win7. :headwall:
jt_kirk

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

10 Jun 2018, 17:52

feiyue wrote:@jt_kirk, I think this is a relatively easy solution: :)

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




Hi, feiyue! thank you very much! Unfortunately i do not understand how this will work :( how this code will convert loaded pictures to strings?
feiyue
Posts: 96
Joined: 08 Aug 2014, 04:08

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

17 Jun 2018, 15:30

@jt_kirk, It is more troublesome to generate a function to read a picture file and then convert it to two valued text.
I see you say there are not many pictures that need to be converted.
So a simple solution is to open these pictures directly,
and then use my tool to capture screen images to generate two valued text. :)
Manlikezab12
Posts: 39
Joined: 28 Nov 2017, 11:55

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

07 Jul 2018, 09:59

The red box which is used to capture the image into text, can you not make it any bigger? It's a little too small for what I want to capture.
Irrelephant
Posts: 4
Joined: 13 Jun 2018, 07:13

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

08 Jul 2018, 01:23

Isn´t it enough to caputre just a part of the image - you don´t have to have the whole picture!

Increasing the the capture window shouldn´t be the problem - you just need to find the right code snippet in the script but on top you´d probably have to adjust the GUI for the fine tuning!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 17 guests