I have a really old application which has to export 1 days worth of data at a time, wait for completion and repeat with a new day. It's cake up until the point where i have to check if the current day is done. The status window that comes up is modal, has a blank caption, has no constant text and doesn't always keep focus(due to another app it loads but doesn't close when done). The only thing constant on the window is a progressbar control with the name "Progress1" (msctls_progress32). This rules out doing nice simple methods like FindWindowWithText . I even considered doing a WaitRectChanged over the bottom corner of the box. However, the program is apparently prone to memory errors which would show up over my progress bar. I have also tried WaitReady and WaitCursorChanged, both of which seem to fail because of the other program being loaded at the start of the process. I have also tried to grab the active window handle when the status bar first loads but before the new app opens and it never works out. I can't even get the window to regain focus manually after that point. Is there a way to check if that progress bar object exists and that it is tied to the application i'm monitoring?
Thanks,
Scott
locating a captionless modal window with no text
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
There are a number of utilities that can do the same thing.
One that I have liked is PrcView, available at http://www.teamcti.com/pview/prcview.htm that has command lines so you you can use it in scripts and batch files.
You could create a loop to periodically check to see if the process is still active and branch accordingly to results.
One that I have liked is PrcView, available at http://www.teamcti.com/pview/prcview.htm that has command lines so you you can use it in scripts and batch files.
You could create a loop to periodically check to see if the process is still active and branch accordingly to results.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Happy belated Happy New Year, armsys
Been a while since I looked at SysInternals. Maybe I should take a new look? Probably been a few years since I considered it. (Just checked, last time I got an update was Dec, 2003).
As I noted, there are many programs which can monitor and kill a process. I have just been comfortable with PrcView, But you can't have too many good tools in the box. Thank YOU for the reminder about SysInternals.
Been a while since I looked at SysInternals. Maybe I should take a new look? Probably been a few years since I considered it. (Just checked, last time I got an update was Dec, 2003).
As I noted, there are many programs which can monitor and kill a process. I have just been comfortable with PrcView, But you can't have too many good tools in the box. Thank YOU for the reminder about SysInternals.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!