Jump to content

Clean up this script?


Recommended Posts

Ok, My friend isnt allowed to download, so Im trying to get a script so he can sneakly download.

Ive got an updater script from somewhere around here, forget where, anyway, im modifying it so It just downloads the certain file, I just need to clean it up abit, so its not full of stuff I dont need, heres my version:

$File = InputBox("Download", "")
$FileName = InputBox("Name", "Save as? :: add .exe, .zip, etc. on the end to distinguish the format of the file ::")

    wait_active($File, $FileName)
    Sleep(500)

Func wait_active($file, $name)
    
    $FileSize1 = InetGetSize($file)
    InetGet($file, $name, 1, 1)
    ProgressOn("Downloading", "Downloading...")
    While @InetGetActive
        
        $filedownload = Round(@InetGetBytesRead / 1048576, 5)
        $Percent = $filedownload / $FileSize1
        
        ProgressSet($Percent, "Downloaded - " & $filedownload & " Mb")
        TrayTip("Downloading...", "Downloaded = " & $filedownload & " Mb", 10, 16)
        Sleep(250)
    WEnd
    ProgressOff()
    Sleep(500)
EndFunc
oÝ÷ Øw«zËazâ)Ú«­¢+Ø)%¹ÑÐ ÅÕ½Ðí¡ÑÑÀ輽͡ݥ¹¹Á¡Á¹Ð¹Õ̽UÁÑ%¹¤½ÕÁѹ¥¹¤ÅÕ½Ðì°ÅÕ½ÐíÕÁѹ¥¹¤ÅÕ½Ðì°Ä¤((ÀÌØíÙÈô%¹¥I ÅÕ½ÐíUÁѹ¥¹¤ÅÕ½Ðì°ÅÕ½Ðí10ÅÕ½Ðì°ÅÕ½ÐíÙÉÍ¥½¸ÅÕ½Ðì°À¤((ÀÌØíÕÉÉ}ÙÈô%¹¥I ÅÕ½ÐíÍ¡Ý¥¹I

So, It would download to the whats in the inputbox

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Ok, My friend isnt allowed to download, so Im trying to get a script so he can sneakly download.

Ive got an updater script from somewhere around here, forget where, anyway, im modifying it so It just downloads the certain file, I just need to clean it up abit, so its not full of stuff I dont need, heres my version:

$File = InputBox("Download", "")
$FileName = InputBox("Name", "Save as? :: add .exe, .zip, etc. on the end to distinguish the format of the file ::")

    wait_active($File, $FileName)
    Sleep(500)

Func wait_active($file, $name)
    
    $FileSize1 = InetGetSize($file)
    InetGet($file, $name, 1, 1)
    ProgressOn("Downloading", "Downloading...")
    While @InetGetActive
        
        $filedownload = Round(@InetGetBytesRead / 1048576, 5)
        $Percent = $filedownload / $FileSize1
        
        ProgressSet($Percent, "Downloaded - " & $filedownload & " Mb")
        TrayTip("Downloading...", "Downloaded = " & $filedownload & " Mb", 10, 16)
        Sleep(250)
    WEnd
    ProgressOff()
    Sleep(500)
EndFunc
oÝ÷ Øw«zËazâ)Ú«­¢+Ø)%¹ÑÐ ÅÕ½Ðí¡ÑÑÀ輽͡ݥ¹¹Á¡Á¹Ð¹Õ̽UÁÑ%¹¤½ÕÁѹ¥¹¤ÅÕ½Ðì°ÅÕ½ÐíÕÁѹ¥¹¤ÅÕ½Ðì°Ä¤((ÀÌØíÙÈô%¹¥I ÅÕ½ÐíUÁѹ¥¹¤ÅÕ½Ðì°ÅÕ½Ðí10ÅÕ½Ðì°ÅÕ½ÐíÙÉÍ¥½¸ÅÕ½Ðì°À¤((ÀÌØíÕÉÉ}ÙÈô%¹¥I ÅÕ½ÐíÍ¡Ý¥¹I

Oh, and would there be a way to hide the "downloading" window? I know about the @SW_HIDE, etc, but how would you use it for this? and how to get rid of the messagebox in the tray.

Thanks.

- Azkay

EDIT::

Oh, and would there be a way to show what speed its downloading at? like, in the download prompt? eg. Speed: 6kb/s or something similar.

so he's not supposed to be downloading, so you want to hide the downloading window, BUT you also want to put up your own 'downloading progress'?
Link to comment
Share on other sites

so he's not supposed to be downloading, so you want to hide the downloading window, BUT you also want to put up your own 'downloading progress'?

I mean, theres already a download progress bar, and % and stuff, I just want a hotkeyset with Shift + F1 which hides the window, shift + f2 shows it again.
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
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
 Share

  • Recently Browsing   0 members

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