Jump to content

Recommended Posts

Posted

Ive been trying for a couple of day to update a progress bar that i have in my gui but i just cant seem to get it working.

i am sure that this function needs more improvment also.

some lines where copied from other scripts (thank you)

here is what i have:

Func _Update()
      Local $FileSize
      Local $url = "http://downloads.sophos.com/tools/sav32sfx.exe" ;Set URL
      Local $folder = @ScriptDir & "\files\CLI\sav32sfx.exe" ;Set folder
      Local $hInet = InetGet($url, $folder, 1, 1) ;Forces a reload from the remote site and return immediately and download in the background
      While Not InetGetInfo($hInet, 2) ;Loop until download is finished
      Sleep(500) ;Sleep for half a second to avoid flicker in the progress bar
      GUICtrlSetData($lblUpdating, "Downloading CLI")
      Local $BytesReceived = InetGetInfo($hInet, 0) ;Get bytes received
      Local $Pct = Int($BytesReceived / $FileSize * 100) ;Calculate percentage
      GUICtrlSetData($Progress1, $Pct & "%") ;Trys to update progress bar   
      WEnd
      GUICtrlSetData($lblUpdating, "")
   EndFunc

thanks in advance.

Posted (edited)

GUICtrlSetData($Progress1, $Pct)

maybe ? surely :)

and division by zero => Firefox

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Posted

Division by zero?  Edano, you must be almost as old as I am!  The younger, digital crowd don't understand we analogs, and they have never heard of division by zero errors.  All that's ok, they have black and white (digital, binary), we have all the colors of the rainbow (analog)!

Meds.  They're not just for breakfast anymore. :'(

Posted

is division by zero allowed meanwhile ? :)  you never know. times are a'changing.

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Posted

Methematically, division by zero is undefined.  But, then again, infinity minus infinity is infinity, go figure.

Meds.  They're not just for breakfast anymore. :'(

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...