FindText - Capture screen image into text and then find it

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: FindText - Capture screen image into text and then find it

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

Post by feiyue » Today, 14:27

Updated to the v6.0 version. :beer:
Slightly modified the machine code.
The image that has been found will be cleaned up in the same color.
Avoid matching the next row (column) when using tolerance lookup.

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

Post by feiyue » Today, 13:55

@nwr425,
Although this function FindText() returns all the locations found,
because the lookup is from top to bottom,
sometimes the middle image is higher than the first image,
so it returns first, so the position returned may be disordered and difficult to sort..

I find that the location of these pictures looks unchanged,
so get the coordinates of the first image as the origin,
you could use relative coordinates to click on other images. Like this:

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

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

Post by nwr425 » Today, 02:37

@feiyue

I want to put this to code using findtext. I want to select a different image other than the one in the top left slot.
Does this program order identical images in a way to do that? i.e x.1 x.2 x.3 x.4 etc etc

Hope this helps clarify! Thanks for help!
https://imgur.com/a/oXmewZy

Default:
Image

Step 1:
Image

Step 2:
Image

Step 3:
Image

Step 4:
Image

Step 5:
Image

Step 6:
Image

Step 7:
Image

Step 8:
Image

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

Post by nwr425 » Today, 02:19

The numbers represent identical images that are being focused by FindText
My end goal is to:

-Click the image1 then immediately after that happens, the image1 that has been clicked will disappear.

-Then I would like to click the image that was directly below the image that previous disappeared.

-Below is an example of image [1] being clicked, and then the next Image to be clicked will be demonstrated using [brackets]

-All images that have disappeared previously will be shown using 'x'

-When 1-8 identical images are present, I would like to click the images in the order shown using brackets.

---DEFAULT BEFORE ANY CLICKS ARE SENT---
1234
5678
---------images 1 to 8 all identical-----------

---1st action/click---
[1]234
5678

--2nd action/click--
x123
[4]567

--3rd action/click---
x[1]23
x456

--4th action/click--
xx12
x[3]45

--5th action/click---
xx[1]2
xx34

--6th action/click--
xxx1
xx[2]3

--7th action/click--
xxx[1]
xxx2

--8th action/click--
xxxx
xxx[1]

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

Post by feiyue » Yesterday, 20:21

@nwr425, Your description is too vague, I still don't understand what you mean.
You can upload the work picture screenshots, and then explain how to do manual work step by step.

If the position of the image remains unchanged after clicking,
you can search for the unique image next to it as the origin,
and then use the offset coordinates relative to the origin to perform the click.

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

Post by nwr425 » Yesterday, 20:05

leosouza85 wrote:
nwr425 wrote:
feiyue wrote:Hi, @nwr425, Although this function FindText() returns all the locations found,
it is recommended to look for images that appear only once in the full screen.

1. When you write web page automation scripts,
you should try to avoid looking for multiple identical images,
try to use a unique image, to avoid unforeseen errors.
Finding another unique image and then using offset coordinates
can easily replace the coordinates of the original image.

2. If you have to use an image that appears in more than one place,
you can narrow the search area to ensure that no two original images
appear in each search area. Don't use full screen lookup.


Any way to select which order/skip the image order?
I have 20 small identical images within close proximity to one another. Hoping to select/click images in the following order:
1>5
1>4
1>3
1>2
1>5
1>4
1>3
repeating/etc...


Those images are in order vertically or horizontally? or in random places?


Visual Example:::
[1][2][3][4]
[5]repeating

Theory of working script[focused images]:::
[1]234
[5]678
--------
x[1]23
x[4]56
--------
xx[1]2
xx[3]4
-------
xxx[1]
xxx[2]
--------
[1]234
[5]678
-------
repeating

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

Post by leosouza85 » Yesterday, 15:25

nwr425 wrote:
feiyue wrote:Hi, @nwr425, Although this function FindText() returns all the locations found,
it is recommended to look for images that appear only once in the full screen.

1. When you write web page automation scripts,
you should try to avoid looking for multiple identical images,
try to use a unique image, to avoid unforeseen errors.
Finding another unique image and then using offset coordinates
can easily replace the coordinates of the original image.

2. If you have to use an image that appears in more than one place,
you can narrow the search area to ensure that no two original images
appear in each search area. Don't use full screen lookup.


Any way to select which order/skip the image order?
I have 20 small identical images within close proximity to one another. Hoping to select/click images in the following order:
1>5
1>4
1>3
1>2
1>5
1>4
1>3
repeating/etc...


Those images are in order vertically or horizontally? or in random places?

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

Post by nwr425 » Yesterday, 05:37

feiyue wrote:Hi, @nwr425, Although this function FindText() returns all the locations found,
it is recommended to look for images that appear only once in the full screen.

1. When you write web page automation scripts,
you should try to avoid looking for multiple identical images,
try to use a unique image, to avoid unforeseen errors.
Finding another unique image and then using offset coordinates
can easily replace the coordinates of the original image.

2. If you have to use an image that appears in more than one place,
you can narrow the search area to ensure that no two original images
appear in each search area. Don't use full screen lookup.


Any way to select which order/skip the image order?
I have 20 small identical images within close proximity to one another. Hoping to select/click images in the following order:
1>5
1>4
1>3
1>2
1>5
1>4
1>3
repeating/etc...

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

Post by feiyue » 18 Sep 2018, 20:41

Hi, @nwr425, Although this function FindText() returns all the locations found,
it is recommended to look for images that appear only once in the full screen.

1. When you write web page automation scripts,
you should try to avoid looking for multiple identical images,
try to use a unique image, to avoid unforeseen errors.
Finding another unique image and then using offset coordinates
can easily replace the coordinates of the original image.

2. If you have to use an image that appears in more than one place,
you can narrow the search area to ensure that no two original images
appear in each search area. Don't use full screen lookup.

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

Post by nwr425 » 18 Sep 2018, 18:17

feiyue wrote:Hi

@feiyue or Anyone else.

I looked through this thread but did not find simple terms of how to complete the following:

When finding multiple identical images on a page, my end goal is to click images in the following order:
1>5
1>4
1>3
1>2
1>5
1>4
1>3
repeating/etc...

I know the normal order is top and left image first. Looking for a work around to skip images 2-4 on the first action, then 2-3, then 2, then repeat.
I can be reached on this thread of the offical AutoHotkey Discord under the name "o0PkVids"

Thanks ahead of time!

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

Post by leosouza85 » 10 Sep 2018, 21:39

Hi, @feiyue, firstly thank you so much for your work, can I ask you something vey very simple? Could you make the script generate the code already inside a verification loop? (loop search this graphics until it finds it). I think it will help us in most use cases! Thank you!

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

Post by leosouza85 » 09 Sep 2018, 23:31

Keep up the good work! It is awesome!

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

Post by bugsbunny » 17 Aug 2018, 14:40

how can i make the script search only the center ?

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

Post by NewJohn45 » 16 Aug 2018, 12:54

Thank you so much, it works amazingly fast!

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

Post by bordop » 16 Aug 2018, 12:50

Just want to thank you for this incredible utility, I use it all the time!

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

Post by feiyue » 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]GeSHi © Codebox Plus

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

Post by NewJohn45 » 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]GeSHi © Codebox Plus

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

Post by feiyue » 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.

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

Post by Irrelephant » 13 Aug 2018, 02:45

I would narrow it down to the Yes and try it again ...

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

Post by nwr425 » 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 516 times
Attachments
forum post.PNG
(24.07 KiB) Not downloaded yet

Top