Jump to content
Sign in to follow this  
DaLiMan

Progress Bar

Recommended Posts

DaLiMan

Is it possible to show a progress bar while copiing a file so that the user knows it is stil running?

Here's what I came up with, but obviously it doesn't work. :lmao:

While $a = "0"
ProgressOn("Progress Meter", "Increments every second", "0 percent")
FileCopy($File, $File2,1)
For $i = 1 to 100 step 1
    sleep(10)
    ProgressSet( $i, $i & " percent")
Next
$a = "1"
WEnd

Share this post


Link to post
Share on other sites
Scooby

I've created the following to do just that.....

$ByteSize = InetGetSize("ftp://ftp.compaq.com/pub/softpaq/sp28501-29000/SP28601.exe")
$KBSize = Round($ByteSize / 1024, 0)
$MBSize = Round($KBSize / 1024, 2)
InetGet("ftp://ftp.compaq.com/pub/softpaq/sp28501-29000/SP28601.exe", "c:\testdl.exe", 1, 1)
ProgressOn("Downloading", "Increments as file downloads", "0% Complete (0KB of " & $KBSize & "KB)")
While @InetGetActive = 1
    Sleep(400)
    $KBNow = Round(@InetGetBytesRead / 1024, 0)
    $KBNow2 = ($KBNow / $KBSize * 100)
    $Percent = Round($KBNow2, 0)
    ProgressSet($Percent, $Percent & "% Complete (" & Round(@InetGetBytesRead / 1024) & "KB of " & $KBSize & "KB)")
Wend
ProgressSet(100 , "Done", "Complete")
sleep(5000)
ProgressOff()

let me know if this works for you....

Scooby

Share this post


Link to post
Share on other sites
Neoborn

use the latest JPM beta and you can COM it....

$objShell=CreateObject("Shell.Application")

$objFldr.CopyHere($sSrc,$lFlags)

... blah blah... insert research here

Lar.

<{POST_SNAPBACK}>

What is that "latest JPM beta" thing?

~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Share this post


Link to post
Share on other sites
buzz44

i wanted to do this b4, use CMD "xcopy" to do it by using _RunDOS


qq

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.