frank10 Posted September 28, 2013 Share Posted September 28, 2013 (edited) I made a script with IE.au3 to download some files from a server with authentication. After a file is downloaded, I want to rename and move it, so I need to check when it is fully downloaded. I tried Inetget() (also with "http://user:pass@www...") but it can't download the files. They are in the form of: http://www.********.com/download/lowres/XYcCdn2x80E3VHW2UM2z/ With _IeNavigate() that link works. But I can't get when it has finished to download. How could I do? BTW: In explorer I see also the icon file changes when finished. Edited September 28, 2013 by frank10 Link to comment Share on other sites More sharing options...
Gianni Posted September 28, 2013 Share Posted September 28, 2013 have a look at the function InetGetInfo( ... , 2) with parameter 2 maybe >this post can help you Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
frank10 Posted September 28, 2013 Author Share Posted September 28, 2013 Thank you PincoPanco, but InetGet doesn't work at all. So I can't check it with InetGetInfo. I think the problem is I have that link in the web page: http://www.********.com/download/lowres/XYcCdn2x80E3VHW2UM2z/ but it refers to the real link (I found it with a download manager), that is: http://clips.******.com/music/50001-8.wav So the first one does nothing with InetGet, while it does with _IENavigate. Link to comment Share on other sites More sharing options...
Gianni Posted September 29, 2013 Share Posted September 29, 2013 if you pass the first url to IE, then, in turn, is your final new url again in IE? if so, maybe you could try to get the target url with _IEPropertyGet(....,"locationURL") and then pass that url to InetGet(), for example something like this: _IeNavigate($oIE, "first url") $TargetURL = _IEPropertyGet($oIE,"locationURL") ; should give the target url InetGet($TargetURL, @ScriptDir & "\destination") otherwise try to locate your target url with the _IELinkGetCollection() function .... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
frank10 Posted September 29, 2013 Author Share Posted September 29, 2013 I tried to use a mix of InetgetSource and IENavigate. InetGetsource only works in an embedded environment, I think because of authentication session (?) (In every case I tried also the user:pass@ method that doesn't work). With an IECreateEmbedded I get the file download, but it appears a dialog to confirm the download and the destination directory. How can I disable that dialogs? In the normal IE I don't get them because of a download accelerator, but in the autoit embedded I get them... Link to comment Share on other sites More sharing options...
frank10 Posted September 29, 2013 Author Share Posted September 29, 2013 (edited) if you pass the first url to IE, then, in turn, is your final new url again in IE? if so, maybe you could try to get the target url with _IEPropertyGet(....,"locationURL") No, when I make IENavigate with the first URL, I get directly the download dialog: I don't get any second URL. I discovered the second URL only looking at the property in a download accelerator that intercepts the download request made in IE. BTW: In IE, without the download accelerator, I get also a dialog box at the bottom of the page. I can't disable it. Do you know how to do it? I use IE 9.0.8 Edited September 29, 2013 by frank10 Link to comment Share on other sites More sharing options...
GMK Posted September 30, 2013 Share Posted September 30, 2013 Another option: use WinHTTP to log on to the site and retrieve the file. Link to comment Share on other sites More sharing options...
frank10 Posted September 30, 2013 Author Share Posted September 30, 2013 For now, I solved the IE issue using an external download accelerator with its window: when finished the download, it closes the window, so I check the existance of the window and get it. Anyway I'm not satisfied with this, I think I'll rewrite the code with Firefox FF.au3: it has a lot of options, such as javascript disable, read Html without images, download control... It's far superior control. Internet Explorer (not the au3 udf) is very disappointing... Eventually also GMK approach could be interesting, thank you. 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