Jump to content
Sign in to follow this  

InetGet problem

Recommended Posts


Hi all,

I am trying to create an internet file downloader. I've just started with the progressbar for testing.

It works fine for the files from internet..)

However it doesn't work for the files from local computer( I am using Apache server running on my PC )

I've created it for testing sake. Whenever I download the file from local computer the script gets frozen ;)

I have no clue how to fix it.. :D

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ProgressConstants.au3>

$address_URL = "http://localhost/newfile_3.mp3"; it doesn't work on localmachine..

Func Example()
    Local $msg
    GUICreate("Downloader",300,100,@DesktopWidth/2 -150 ,@DesktopHeight/2 - 50 )  
    $progress_download = GUICtrlCreateProgress(10, 10, 200, 20,$PBS_SMOOTH)
    $button_start= GUICtrlCreateButton ("stahuj",10,40,60,25)
    $label_progress = GuictrlCreatelabel("",10,70,400,30)
    While 1
        $msg = GUIGetMsg()
        if $msg=$button_start Then
            InetGet($address_URL,@DesktopDir & "\music.mp3", 1, 1)
            $size = InetGetSize($address_URL)
            While @InetGetActive
                GuiCtrlSetData($label_progress,$BytesRead & "bytes of " & $size)
        If $msg = -3 Then ExitLoop

Share this post

Link to post
Share on other sites
Richard Robertson

The Apache server probably isn't configured to listen on IP address If you use the network adapter's IP address it will work just fine.

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.