RichardL Posted October 15, 2012 Share Posted October 15, 2012 I'm driving an application with AutoIt, I know the coordinates of the window control. I want to know if the area is blank, and no dialogues in front of it. Maybe there's a way with PixelSearch, but I want to know if there is any pixel that is not white. I could checksum the area, and compare with a reference, but the reference number would change with control size. Thanks. Link to comment Share on other sites More sharing options...
EKY32 Posted October 15, 2012 Share Posted October 15, 2012 I want to know if the area is blankYou mean you want to know if the selected area has no controls inside? [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font] Link to comment Share on other sites More sharing options...
FireFox Posted October 15, 2012 Share Posted October 15, 2012 @RichardL Why not setting the window as topmost or checking its active state? If not, then you can loop through visible windows and getting their coords in order to know if one of them is over the window. But I have not understood the blank part... Br, FireFox. Link to comment Share on other sites More sharing options...
JohnOne Posted October 15, 2012 Share Posted October 15, 2012 If it really boils down to pixels, then loop though the control pos (I suggest you use a Step) with pixelgetcolor and return false if a pixel is not white. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
RichardL Posted October 15, 2012 Author Share Posted October 15, 2012 It's a specialised drawing package and it might have been left with some drawings open, i.e. the main window is not all white, and as well as that it might have dialogues open. Yes, JohnOne I could scan all the pixels as you say, but as the mechanism is the same as PixelSearch, but with opposite criteria I was hoping there was a way to do it by simply selecting the right options. Thanks all. Link to comment Share on other sites More sharing options...
JohnOne Posted October 15, 2012 Share Posted October 15, 2012 Have you tried testing ControlgetText() I know it might not have text, but it's something I'd do on the off chance something is returned when colours are present. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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