jbc1 Posted July 21, 2009 Share Posted July 21, 2009 Hi, I have a popup window which appears during my automation run which needs to be closed. The 'OK' button on the popup needs to be clicked in order to close it. I've used the AutoIT Windows tool to gather the information I need to click this button, I have it's ID, text, and class. I cannot use the text as this popup will appear localized in some languages. The ID of the button appears as '100' I have tried clicking the 'OK' button like this: WinActivate("Alert Window") ControlClick("Alert Window", "", "100") But it does not work. Is there any way I can click the button by using its class? Thanks Link to comment Share on other sites More sharing options...
nekkutta Posted July 21, 2009 Share Posted July 21, 2009 why not use "Send("!o")" for the keyboard shortcut to the ok button? [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
jbc1 Posted July 21, 2009 Author Share Posted July 21, 2009 why not use "Send("!o")" for the keyboard shortcut to the ok button?Doesn't work, this is not not a typical popup window. It doesn't have any keyboard shorcuts. Link to comment Share on other sites More sharing options...
nekkutta Posted July 21, 2009 Share Posted July 21, 2009 try "[CLASS:100]" instead of "100" in ControlClick("Alert Window", "", "100") [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] 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