Jump to content

IE UDF Download a file


ryadical
 Share

Recommended Posts

I am using the IE.au3 udf to automate a task on a website. One of the tasks I need to do is to download a file that is linked on the website. The website has a login/pass. The normal way I download a file is with InetGet which uses IE but unfortunately it does not have a way to specify the hWnd of the IE window you want to use, which means it opens a new IE session and tries to use the download link which is not valid because it is not logged in. 

I know I could click on the download link but I would rather not do it that way as I do not want to start working with controls outside of IE (the save dialog) on this particular application. 

Link to comment
Share on other sites

  • Moderators

1.

Wait... InetGet uses IE to download?

I'm so confused.

2.

Why would you have multiple browser sessions open?

You're just asking for application management strains that way.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

1.

Wait... InetGet uses IE to download?

I'm so confused.

2.

Why would you have multiple browser sessions open?

You're just asking for application management strains that way.

Yes, it does. If you read the helpfile, you will see the line: 

Internet Explorer 3 or greater must be installed for this function to work.

Since it was using IE behinds the scenes, I was hoping to tell it to use the IE window that I was controlling, not use a new session. 

Link to comment
Share on other sites

  • Moderators

Pretty sure it's not opening an IE session.  It is more likely using the wininet.dll, and that statement ensures that wininet.dll would be installed.

Now, I will also say, that it probably uses whatever cache/cookies are currently available, so you may need to:

1. Create a non-visible IE browser using the _IECreate func.

2. Log in

3. Launch your script

4. _IEQuit() / close browsing session

1, 2 and 4, could be done in like 5 lines of code

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...