ileandros Posted January 30, 2013 Posted January 30, 2013 (edited) Hello, Just made this little script for a project and thought of sharing it with you. Hope it will help someone. $size = InetGetSize ( "http://downloads.myeclipseide.com/downloads/products/mobione/2.X/MobiOne_2.3.1_Installer.exe") $TotalSize = Round($size / 1024) ConsoleWrite("Total size in KB/s is: " & $TotalSize & "KB/s " & @CRLF) $dl = INetGet("http://downloads.myeclipseide.com/downloads/products/mobione/2.X/MobiOne_2.3.1_Installer.exe",@DesktopDir & "\test.exe",1,1) ProgressOn("Download ProgressBar", "Download progress in KB/s") Do $sec = @SEC $Bytes = Round(InetGetInfo($dl,0)) While @SEC = $sec Sleep(10) WEnd $CalBytes = Round(InetGetInfo($dl,0)) $TotalSize = $TotalSize - (($CalBytes - $Bytes) /1024) $Percentage = Round($TotalSize / $size * 100000) $Percentage = 100 - $Percentage ConsoleWrite($TotalSize & "KB/s" & @CRLF & $Percentage & "%" & @CRLF) ProgressSet($Percentage) Until InetGetInfo($dl,2) ProgressOff() Edit: This on is with progessbar on a gui for people that are not familiar with autoit #include <GUIConstantsEx.au3> $size = InetGetSize ( "http://downloads.myeclipseide.com/downloads/products/mobione/2.X/MobiOne_2.3.1_Installer.exe") $TotalSize = Round($size / 1024) ConsoleWrite("Total size in KB/s is: " & $TotalSize & "KB/s " & @CRLF) $dl = INetGet("http://downloads.myeclipseide.com/downloads/products/mobione/2.X/MobiOne_2.3.1_Installer.exe",@DesktopDir & "\test.exe",1,1) $hGUI = GUICreate("ProgressBar", 200,100) $probar = GUICtrlCreateProgress(10,60,180,25) GUISetState() Do $sec = @SEC $Bytes = Round(InetGetInfo($dl,0)) While @SEC = $sec Sleep(10) If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd $CalBytes = Round(InetGetInfo($dl,0)) $TotalSize = $TotalSize - (($CalBytes - $Bytes) /1024) $Percentage = Round($TotalSize / $size * 100000) $Percentage = 100 - $Percentage ConsoleWrite($TotalSize & "KB/s" & @CRLF & $Percentage & "%" & @CRLF) GUICtrlSetData($probar,$Percentage) Until InetGetInfo($dl,2) Edited January 30, 2013 by ileandros I feel nothing.It feels great.
lorenkinzel Posted January 30, 2013 Posted January 30, 2013 Do you get AdHits for GarenaPlus? muttley Otherwise, I like it.
FaridAgl Posted January 30, 2013 Posted January 30, 2013 You have been banned from all HLR rooms http://faridaghili.ir
ileandros Posted January 30, 2013 Author Posted January 30, 2013 Ok i just changed the url because i didn't like it. I don't even know what garena is btw. Just found a "random url" with 20+mb. I wanted to test it with high bytes items thats why i added that link. Hope this link now is not that much popular I feel nothing.It feels great.
Myicq Posted January 31, 2013 Posted January 31, 2013 @ileandrosYou can always try some of these test files I am just a hobby programmer, and nothing great to publish right now.
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