raggletaggle Posted March 3, 2007 Posted March 3, 2007 Very new to autoit and certainly not an amazing programmer by any means. Love it so far. One situation I've run into that I hope someone can help me with is the best method to tell a scrpt a document has loaded into a program. I'm running reports from a program called cognos, then taking screenshots of the data. Due to the size of the database it pull from it can take upward of a minute to do it. Sometimes more, depending on the time of day, network utilization, etc. Right now my script is just setting an arbitrary sleep time of 100000 which seems to be working, but if it's particularly slow on any given day, I'll just end up taking a snap of a white screen. Winwaitactivate won't necessarily work because the title has loaded, even if the report hasn't. Hoping someone here might be able to guide me in the right direction. Thanks
nfwu Posted March 4, 2007 Posted March 4, 2007 (edited) Have you tried the text inside the window? Or maybe the status bar?Edit: Or, you can wait until the pixels on teh screen are no longer white, then sleep for short while (3 secs) just in case, then take a snapshot.#) Edited March 4, 2007 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
raggletaggle Posted March 4, 2007 Author Posted March 4, 2007 Have you tried the text inside the window? Or maybe the status bar?Edit: Or, you can wait until the pixels on teh screen are no longer white, then sleep for short while (3 secs) just in case, then take a snapshot.#)thanks for your help. I was initially thinking of the status bar as well, but cognos doesn't list any text there even when the document is finally loaded. I eventually went with a similar idea to your pixel idea, and used the following script to look for a specific color on the screen. CODEDo $p = PixelGetColor(357, 439) Sleep(100)Until $p = 0xC4C750Works great!!! Now all I have to do is learn how to use coordinates instead of pixels ( that's for another day )Thanks again for your help
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