ryadical Posted February 17, 2015 Share Posted February 17, 2015 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 More sharing options...
Danp2 Posted February 17, 2015 Share Posted February 17, 2015 Have you tried InetGet in conjunction with _IECreateEmbedded()? This has worked for me in the past. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 17, 2015 Moderators Share Posted February 17, 2015 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 More sharing options...
ryadical Posted February 17, 2015 Author Share Posted February 17, 2015 That seems to work. I was hoping there was a way to do it without imbeding IE but if no one else chimes in I guess I will have to do it that way. Link to comment Share on other sites More sharing options...
ryadical Posted February 17, 2015 Author Share Posted February 17, 2015 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 More sharing options...
kylomas Posted February 17, 2015 Share Posted February 17, 2015 ryadical, Not sure why the Help file says that but InetGet does NOT start an instance of IE... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 17, 2015 Moderators Share Posted February 17, 2015 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 More sharing options...
kylomas Posted February 17, 2015 Share Posted February 17, 2015 @SmOke_N - I just ran a script that downloads in a loop, I did not see an instance of IE in ProcessExplorer... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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