Elaine Posted May 9, 2010 Share Posted May 9, 2010 Hi, I have a script that works on XP but needs to be moved to Windows 2003 Server. My script downloads a file from a website, and fails at this line on Windows 2003 Server: ControlSend("File download","","[CLASS:Button; INSTANCE:2]","{Enter}") On XP, that command causes the 'Save' button be clicked and the file to download but on Windows 2003 Server it causes the window to close, as if the 'Cancel' button had been clicked. I have tried many variations and other commands but none succeeds in getting the file to save. ConrolClick won't work on the 'File Download' window on either OS. Can someone please help me to get the download working? thanks very much, Elaine Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 This is very interesting. It seems that you cannot control that window properly using Controlsend or controlclick. I even disabled all the buttons except save and still nothing. Your best bet is to use Winactivate() & normal Send(). It's not ideal, but it works... Opt("Wintitlematchmode",2) WinActivate("File Download") WinWaitActive("File Download") Send("s") Link to comment Share on other sites More sharing options...
Elaine Posted May 10, 2010 Author Share Posted May 10, 2010 Dear Hawky358, Thanks very much for finding a way to make it work. I am surprised the "s" works. I had tried "^s" and "!s", thinking it needed a Ctrl or ALT but they didn't work, while just plain "s" worked. Elaine 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