I am familiar with the 'winActivate' function and use it.
But now I would like to ask if it possible to read data from a visible window in Relative mode without it being activated in front of the other windows?
I added a Screenshot.
In the picture, you see three windows. The middle one is the "top" and has the focus. I want to read the yellow line position using 'pixelSearch' function in Relative mode also from the bottom window (which I have its data in terms of 'title', 'width', 'height', and its maximum X, Y values) without Activate it..
If it is possible, which function should I use?
James
read in Relative mode from a visible window that is not 'activated' ??
read in Relative mode from a visible window that is not 'activated' ??
- Attachments
-
- Screenshot_2022-06-27_13-31-21(1).png (83.1 KiB) Viewed 329 times
Last edited by James9491 on 27 Jun 2022, 09:40, edited 2 times in total.
Re: read in Relative mode from a visible window that is not 'activated' ??
Perhaps:
Or:
There is also ACC and now UIA (search forum).
Code: Select all
ControlGetText, text, Edit1, ahk_exe notepad.exe
MsgBox, 64, Text, %text%
Code: Select all
WinGetText, text, ahk_exe notepad.exe
MsgBox, 64, Text, %text%
Re: read in Relative mode from a visible window that is not 'activated' ??
When you use the output of WinGetPos of the inactive window as the input of PixelSearch, what is the problem? You can limit the search (overlapping active window), when you use WinGetPos of the active window and combine its output to the PixelSearch command. Provided, that you don't need to read invisible parts of the window.