retrieving button name from some dialog/window?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
vanfanel
Newbie
Posts: 15
Joined: Sat Sep 11, 2004 12:38 pm

retrieving button name from some dialog/window?

Post by vanfanel » Wed Apr 06, 2005 4:07 pm

I uninstall a program that has a dialog that comes up during the uninstall. The only way I can tell that it finishes is when the "cancel" button changes to a "finish" button. Is there some way to wait/find this button?

I should note that It does have a status bar however I'd like to be able to do other things while it's uninstalling so I don't think I can get pixel information. Is there some way for MS to search or wait for a specific button in that dialog to come up? Or does PushButton have some return code if it fails to push it...that could probably be put in a loop as well if it exists.

thanks.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Apr 06, 2005 4:38 pm

Use GetControlText in a loop. Use Tools/View System Windows to determine the class name of this button and the text you are waiting for it to become. Then use a loop something like:

Label>WaitButton
GetControlText>window_name,button_class_name,instance,text
If>texttext_you_are_waiting_for,WaitButton
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts