Sign in to follow this  
Followers 0
torsti

PixelColor without focus

6 posts in this topic

Is there some way to get PixelColor from non-focused windows? How about sending mouse clicks?

And how would you use WindowGetHandle to get the handle of the currently focused window without WindowGetTitle("") which returns the first one with that title and not necessarily the currently focused window?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

PixelSearch() or PixelGetColour() only works on what you see on the screen, if the window is minimized you cant search it, only what is visualy infront of you.

Look at this topic

http://www.autoitscript.com/forum/index.php?showtopic=7112

its a UDF called MouseClickPlus() that enables you to click in a minimizes window.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

PixelSearch() or PixelGetColour() only works on what you see on the screen, if the window is minimized you cant search it, only what is visualy infront of you.

seeing is fine with me, messing with the focus isn't so i'd like to get a pixel from nonfocused window even if it has to be visible

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It doesnt have to be in focus... It gets whats on the screen it doesnt matter if its in focus or not, minimized or whatever. Its what you see on your computer screen. As If you took a ScreenShot, it takes exactly what you are seeing on your monitor.

Ofcourse it depends on your settings

Opt("PixelCoordMode", 1) 

Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:
0 = relative coords to the active window
1 = absolute screen coordinates (default)
2 = relative coords to the client area of the active window
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Ofcourse it depends on your settings

Opt("PixelCoordMode", 1)

[post="73027"]<{POST_SNAPBACK}>[/post]

hmm yes that would work but then i'll have to calculate the relative coords from the windows position. not a big problem. good idea. didn't think of that.

Share this post


Link to post
Share on other sites

Yes, you can use the AutoIt Window Info Tool, Click Options > Coord Mode > Screen, Window or Client.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0