Jump to content

Progress Bar


DaLiMan
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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

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...