Sign in to follow this  
Followers 0
Alma

Need help with "Download file"/"Save as" from IE8

8 posts in this topic

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



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}".

:graduated:


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

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}".

:graduated:

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
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

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

#7 ·  Posted (edited)

Hi Bruce,

Tried it and it didn't help. The "Download File" window is there forever...any other idea?

Thanks, Alma

If you can't get it to work, as you know the download url, may be you could download it with inetget ...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0