RowBan Posted January 11, 2013 Share Posted January 11, 2013 So if I got PixelChecksum correctly, it can check a square of pixels on a window. Can I somehow use this to invoke a forced continuation of the script? An example: I have one window where the pixels will be the same for an unknown period of time, and suddenly changes. Instead of using Sleep(x) I want the script to recognize when the pixels in the window has changed, and then continue executing. Is this possible with PixelChecksum? Also is it possible with any kind of reliable way to get the ControlHandle of a Window and store it as a variable? I can only get it through the AutoIt Window Spy. Thanks! Link to comment Share on other sites More sharing options...
JohnOne Posted January 11, 2013 Share Posted January 11, 2013 1: Check Pixels in a conditional loop. 2: WingetHandle, WinActivate, ... 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...
RowBan Posted January 11, 2013 Author Share Posted January 11, 2013 (edited) 1: Check Pixels in a conditional loop. 2: WingetHandle, WinActivate, ... 1: Success: Returns the checksum value of the region. Failure: Returns 0. Returning the checksum. I want the script to do this. $checksum = PixelChecksum(blahblah) if $checksum = Whatever it returns then continue if not keep waiting for it to change Something like that 2: WinGetHandle requires me to use the title, there is no title of the window I'm trying to get the handle of. And when there is a title it is changing every time I open the application again. Edit: I guess I could use $hWnd = WinGetHandle("[ACTIVE]")? Allthough it would force me to make my script look uglier than it already is, but I guess I have no choice Edited January 11, 2013 by RowBan Link to comment Share on other sites More sharing options...
JohnOne Posted January 11, 2013 Share Posted January 11, 2013 1: Use a loop, While Wend <- help file 2: Opt <- WinTitleMatchMode <- help file 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