FindText - Capture screen image into text and then find it

Post your working scripts, libraries and tools
GregTree
Posts: 1
Joined: 15 May 2019, 14:47

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

15 May 2019, 14:59

Hello,

When a screen is scaled, the capture function does not work as expected.

Example:

1.External monitor with a resolution of 2160x3840 that is scaled to 200%

2. Selecting to capture a portion of the screen results in the capture of another portion of the screen, offset by the scaling.

3. The weird thing is that it will actually send the mouse to the correct part of the screen, despite the "image" not matching up, but only if there is a text/image to capture.

4. It "breaks" when the capture is only able to capture a blank area of the screen, or a feature which is common or repeats, resulting in multiple similar features (a line, bar or something similar)

Does anyone know of a way to make this work with a monitor that is scaled? I've tried working backward, making captures of the screen when it is not scaled, and using those later when it is scaled. It doesn't work.
I've even tried the tedious task of clicking around and trying to find the "offset" to capture the feature I'm actually interested in, but it only results in sending the mouse to the exact place where I capture from, and not the feature I actually want to capture, which is different.

It appears the capture feature can't tell that the screen is scaled.

I'd love to use my monitor in the higher resolution, but I can't because of this scaling issue and being unable to capture.

Hopefully this doesn't read as confusing as it sounds. I'll be very grateful if someone knows a workaround to this most annoying problem!

Cheers!
manehscripts
Posts: 20
Joined: 03 May 2019, 16:10

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

18 May 2019, 00:00

Hello, is it possible to implement a Hex code of an image for your system to find? Or you know some code that does an ImageSearch in the active window, searching for the image of the hex code that is in the script.

Example:

Code: Select all

if (found_hex_code) {
   MouseMove, x, y
}
Hex code of a image:
Screenshot_1.jpg
Screenshot_1.jpg (114.86 KiB) Viewed 66 times

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 49 guests