fgx00171 Posted November 24, 2009 Share Posted November 24, 2009 My script is meant to drive the 'File Download' dialog of an Internet Explorer window, and assumes the dialog is visible when the script starts. Here's what I have so far: WinWait("File Download"); WinActivate("File Download"); ControlClick("File Download", "","[CLASS:Button; INSTANCE:2]"); I have a problem here in that the last command (ControlClick) doesn't click the 'Save' button. It DOES make the 'Save' button on the dialog get focus (it's border gets highlighted). If I change the last command to: ControlClick("File Download", "","[CLASS:Button; INSTANCE:1]"); then the 'Open' button gets highlighted (but not pressed). If I change it to: ControlClick("File Download", "","[CLASS:Button; INSTANCE:3]"); Then the 3rd ('Cancel') button does get pressed, and the dialog disappears. It seems as though something is different about the way the script is treating the Open and Save buttons vs. the Cancel button? Any info appreciated. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 25, 2009 Share Posted November 25, 2009 The file open and save dialogs get special protection from automated inputs for security reasons. Cancel doesn't have the same risks as open or save, so it doesn't get the same protection. There are work-arounds posted. Search the forum. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
AnselRoe Posted November 30, 2009 Share Posted November 30, 2009 My script is meant to drive the 'File Download' dialog of an Internet Explorer window, and assumes the dialog is visible when the script starts. Here's what I have so far: WinWait("File Download"); WinActivate("File Download"); ControlClick("File Download", "","[CLASS:Button; INSTANCE:2]"); I have a problem here in that the last command (ControlClick) doesn't click the 'Save' button. It DOES make the 'Save' button on the dialog get focus (it's border gets highlighted). If I change the last command to: ControlClick("File Download", "","[CLASS:Button; INSTANCE:1]"); then the 'Open' button gets highlighted (but not pressed). If I change it to: ControlClick("File Download", "","[CLASS:Button; INSTANCE:3]"); Then the 3rd ('Cancel') button does get pressed, and the dialog disappears. It seems as though something is different about the way the script is treating the Open and Save buttons vs. the Cancel button? Any info appreciated. 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