Jump to content

Recommended Posts

Posted

Hi guys, i have a doubt using InetGet

I have made this script:

SplashTextOn("", "Downloading...", 200, 40, -1, -1, 1, "",10,"")
Local $hDownload = InetGet("https://github.com/test/test/zipball/master", @WorkingDir & "\Test.zip", 1, 1)
Do
    Sleep(250)
Until InetGetInfo($hDownload, 2)
InetClose($hDownload)
SplashOff()
MsgBox(0, "", "Completed")

The script work, but i have made the filename ( Test.zip )

So i have this question:

1) Can automatically script set the original filename?

2) Can automatically script set the extension? (optional, i think is not possible)

Thanks

Posted (edited)

Have a look in my signature for _InetGetProgress.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

Thanks guinness,but i need a little help.

I don't understand how to use it :D

Sorry

EDIT:

I have add the example to your script:

Global $sFilePath, $sFileURL
$sFileURL = "https://github.com/test/test/zipball/master"
$sFilePath = _InetGetProgress($sFileURL, @TempDir & "")
If @error Then
    MsgBox(64, "Error", "Check the URL or your Internet Connection!")
Else
    MsgBox(64, "Success", "Downloaded >> " & $sFilePath)
EndIf

It work , but i have a wrong filename ( the filename is not "master" ) and no extension. What i'm doing wrong?

Edited by johnmcloud
Posted (edited)

If the URL doesn't have the filename tacked onto the end of it then have a look at this example by Yashied >>

Edit: Though it might not work for your URL, give it a try.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 12/12/2011 at 10:41 AM, 'guinness said:

If the URL doesn't have the filename tacked onto the end of it then have a look at this example by Yashied >>

Edit: Though it might not work for your URL, give it a try.

I have try it but same problem. I don't understad this limitation, but is not a problem for now, i'll set the filename manually.

Thanks

Edited by johnmcloud

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
×
×
  • Create New...