Jump to content
Sign in to follow this  
ganon64

pixel detection (window unfocused)

Recommended Posts

ganon64

hi, is pixel detection possible within an application if its window isn't focused?

Share this post


Link to post
Share on other sites
Davo

Pixel detection works as a "what you see is what you get"

As long as the window you want to get the pixels on is the top most window on the screen it will work. It doesn't care about the focus of the window :)

Dave

Edited by Davo

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Share this post


Link to post
Share on other sites
ganon64

i know but i want to be able to pixel detect without the window being on top or focused and like use msn or something whilst its pixel detecting and ctrlsending stuff to the application

i am reasonably sure its not possible?

Share this post


Link to post
Share on other sites
Davo

I really don't think you can do that because a pixel can't be two colours at the same time lol :) its either white or its black, its not black under its white or anything like that :D but then again i don't know anything is possible. But i really don't think its possible :D

Dave


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Share this post


Link to post
Share on other sites
Paulie

If a window is minimized, its pixels are no longer on the screen, therefore searching will not return the colors for pixels of the window. They no longer exist. At least not until the window is opened.

Focus however does not matter.

Share this post


Link to post
Share on other sites
SmOke_N

Focus however does not matter.

This is true to a point... it doesn't matter, if you know the windows permanent and always screen position.

If you don't, then you need to find the windows position, and make your calculations accordingly. I use a multitude combination "WindowFromPoint", "GetParent", Client Position, etc... to make it as accurate as possible, and make sure the area I'm searching is actually visible, if not, to wait until it is, or make it visible to fit my needs.

I had to make 5 or 6 UDFs to do this, as there is no built in option at the moment (I believe Valik was working on a change at one time, but I don't know if he's even had the time or desire at the moment to implement it).


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×