Alma Posted December 8, 2010 Share Posted December 8, 2010 Hi, I am trying to automate a "Download File" and then "Save as" from IE8 without success. The script gets to the point where the "Download File" windows pops up but then nothing happens. Any help will be much appreciated. Here is my script: #include <IE.au3> $oIE = _IECreate ("http://127.0.0.1/my_site") _IENavigate ($oIE, "http://127.0.0.1/my_site/download.asp?date=11_2010") WinWait("File Download","Do you want to open or save th") ControlClick("File Download","Do you want to open or save this file","Button2") WinWait("Save As","Save &in:") ControlClick("Save As","Save &in:","Button2") WinWait("Save As","C:\10490001_11_2010.zip alread") ControlClick("Save As","C:\10490001_11_2010.zip alread","Button1") WinWait("Download complete","Download Complete") ControlClick("Download complete","Download Complete","Button4") Thanks in advance, Alma Link to comment Share on other sites More sharing options...
JohnOne Posted December 8, 2010 Share Posted December 8, 2010 Are you certain "Button2" is a valid control ID? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 8, 2010 Share Posted December 8, 2010 Are you certain "Button2" is a valid control ID? It is valid ClassNN format. Could have been done as "[CLASS:Button; INSTANCE:2]". Because downloading files can bring in malware, some small measure of extra protection has been added to IE in those file handling dialogs. They seem to block some synthetic inputs. It can often still be done by giving focus to the button and sending "{ENTER}". 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...
Alma Posted December 8, 2010 Author Share Posted December 8, 2010 It is valid ClassNN format. Could have been done as "[CLASS:Button; INSTANCE:2]". Because downloading files can bring in malware, some small measure of extra protection has been added to IE in those file handling dialogs. They seem to block some synthetic inputs. It can often still be done by giving focus to the button and sending "{ENTER}". Thank you. Since I am a newbie, can you please write me back exactly how to give focus and then send the {ENTER}? Thanks, Alma Link to comment Share on other sites More sharing options...
somdcomputerguy Posted December 8, 2010 Share Posted December 8, 2010 WinActivate and Send. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Alma Posted December 10, 2010 Author Share Posted December 10, 2010 WinActivate and Send.Hi Bruce,Tried it and it didn't help. The "Download File" window is there forever...any other idea?Thanks, Alma Link to comment Share on other sites More sharing options...
wakillon Posted December 11, 2010 Share Posted December 11, 2010 (edited) Hi Bruce,Tried it and it didn't help. The "Download File" window is there forever...any other idea?Thanks, AlmaIf you can't get it to work, as you know the download url, may be you could download it with inetget ... Edited December 11, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Alma Posted December 12, 2010 Author Share Posted December 12, 2010 Hi, just found out the problem: I should have used: _IENavigate ($oIE, "http://127.0.0.1/my_site/download.asp?date=11_2010", 0) Now everything works... Alma 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