Alma 0 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 Share this post Link to post Share on other sites
JohnOne 1,603 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. Share this post Link to post Share on other sites
PsaltyDS 39 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 Share this post Link to post Share on other sites
Alma 0 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 Share this post Link to post Share on other sites
somdcomputerguy 103 Posted December 8, 2010 WinActivate and Send. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
Alma 0 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 Share this post Link to post Share on other sites
wakillon 403 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 Share this post Link to post Share on other sites
Alma 0 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 Share this post Link to post Share on other sites