ganon64 Posted May 18, 2007 Share Posted May 18, 2007 hi, is pixel detection possible within an application if its window isn't focused? Link to comment Share on other sites More sharing options...
Davo Posted May 18, 2007 Share Posted May 18, 2007 (edited) 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 May 18, 2007 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!!! Link to comment Share on other sites More sharing options...
ganon64 Posted May 18, 2007 Author Share Posted May 18, 2007 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? Link to comment Share on other sites More sharing options...
Davo Posted May 18, 2007 Share Posted May 18, 2007 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 but then again i don't know anything is possible. But i really don't think its possible 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!!! Link to comment Share on other sites More sharing options...
Paulie Posted May 18, 2007 Share Posted May 18, 2007 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. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 18, 2007 Moderators Share Posted May 18, 2007 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now