Sign in to follow this  
Followers 0
Guest AllanC

Download manager

5 posts in this topic

i cant get this to work, but the download part works alone with the progressbar but when i put it together like here with my input boxes, the progressbar will not do any thing

and when the file is downloadet it just start over :)

----------------------------------------------------------------------

#Include <GUIConstants.au3>

WinClose("Download Time maneger", "")

GUICreate("Download Time maneger", 390,250)

GUICtrlCreatelabel ("Download 1", 10, 20, 300, 20)

global $dl1 = GUICtrlCreateInput ("http://www.ige.dk/files/Battlefield2/BF2-Lanvegas.rar", 10, 35, 200, 20) ;insert link to the file

global $place1 = GUICtrlCreateInput ("file.exe", 10, 80, 200, 20)

global $knap = GUICtrlCreateButton ("Download file",250,30,100,25) ;download button

GuiSetState(@SW_SHOW)

while 1

$msg = GUIGetMsg()

if $msg = $knap then

ProgressOn("Progress Meter", "Så meget har den hentet :)", "0 percent")

$d = guiread($dl1)

$p = guiread($place1)

$size = InetGetSize($d)

$Procent = $size / 100

$h = $Procent

$aktualsize = 0

$i = 0

GUISetState (@SW_SHOW)

while 1 = 1

if $aktualsize = 0 then

InetGet($d,$p, 1, 1) ; -----> filen den henter <-----

endif

if $aktualsize > $Procent then

$OmRegnSize = $aktualsize / 1024 / 1024

$OmregnSize = Round($OmRegnSize, 2)

$size1 = $size / 1024 / 1024

$size1 = Round($size1, 2)

ProgressSet( $i, $i & " % hentet " & $OmRegnSize & " Mb Af " & $size1 & " Mb")

$Procent = $procent + $h

$i = $i +1

$aktualsize = FileGetSize($d)

elseif $aktualsize = $size then

exitloop

endif

$aktualsize = FileGetSize($d)

wend

ProgressSet(100 , "Done", "Complete")

sleep(1000)

ProgressOff()

endif

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

wend

-------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites



I'm not good with debugging people's script, so I made my own version.

Download http://www.autoitscript.com/fileman/users/public/SlimShady/DownloadMngr.au3.

Maybe you'll learn things from studying it.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

GUIRead($whatever)oÝ÷ Ûú®¢×º·¥Ê+wöÊ®¢×ºÚ"µÍÕRPÝXY
    ÌÍÝÚ]]
Perhaps that's your problem... try it...

Damnations - I've just replied to a post that was made TWO years ago : o:)-_-:o:D:huh::idea::huh::whistle:;);):P:):D:xB)

Edited by Pa Callender

[size="4"]YOU SHALL NOT PARSE!![/size]

Share this post


Link to post
Share on other sites

Perhaps that's your problem... try it...

Damnations - I've just replied to a post that was made TWO years ago : o:)-_-:D:D:huh::idea::):whistle:;);):P:o:D:huh::x

Umm no this post was NOT made two years ago, that was mearely the date he became a member in Auto-It forums B)


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Nov 2 2004, 09:40 AM

Date of SlimShady's last post in this thread.

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  
Followers 0