Muhammad_Awais_Sharif Posted September 24, 2016 Share Posted September 24, 2016 Hi I want to download Program http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe how i can download this file ? when i try to get it's size InetGetSize() i get a invalid size how i can download this file ? please help Link to comment Share on other sites More sharing options...
InunoTaishou Posted September 24, 2016 Share Posted September 24, 2016 InetGetSize seems to work fine for me. Post the code you used to get the invalid size Link to comment Share on other sites More sharing options...
Muhammad_Awais_Sharif Posted September 25, 2016 Author Share Posted September 25, 2016 $Surl = "http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe" MsgBox(0,"Size of File",InetGetSize($Surl)) this is simplest code When i tried to download with this function I am getting same thing $Surl = "http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe" _DownloadProgress($Surl, "jdk-8u101-nb-8_1-windows-x64.exe","jdk with Netbeans") Func _DownloadProgress($FileURL, $FileName, $ProgramName) $FileSaveLocation = @ScriptDir & "\" & $FileName $FileSize = InetGetSize($FileURL) $FileDownload = InetGet($FileURL, $FileSaveLocation, 0, 1) Do $Percentage = InetGetInfo($FileDownload, 0) * 100 / $FileSize ConsoleWrite(Round($Percentage, 0) & @CRLF) ConsoleWrite(Round($Percentage, 0) & "% Downloaded " & Round(InetGetInfo($FileDownload, 0) / 1048576, 2) & " of " & Round($FileSize / 1048576, 2) & " MB" &@CRLF) Sleep(550) Until InetGetInfo($FileDownload, 2) EndFunc It's original size is 312 MB But i am getting 5307 with InetGetSize Link to comment Share on other sites More sharing options...
Muhammad_Awais_Sharif Posted September 25, 2016 Author Share Posted September 25, 2016 This is not a normal link it has some id with it for example when i give http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe link to Internet Download Manager.I don't know what it does but it get url some thing like this http://download.oracle.com/otn-pub/java/jdk-nb/8u101-8.1/jdk-8u101-nb-8_1-windows-x64.exe?AuthParam=1474790381_0fee755787a7d73f2f42549cee65ab35 So can i do something with Autoit that it will get this authParam ? 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