DaLiMan Posted February 17, 2005 Share Posted February 17, 2005 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. 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 More sharing options...
Scooby Posted March 17, 2005 Share Posted March 17, 2005 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 More sharing options...
therks Posted March 17, 2005 Share Posted March 17, 2005 Uhm... no offense Scooby, but what does your script have to do with copying a file? My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Scooby Posted March 17, 2005 Share Posted March 17, 2005 Misread, sorry guys. Link to comment Share on other sites More sharing options...
Neoborn Posted March 18, 2005 Share Posted March 18, 2005 use the latest JPM beta and you can COM it....$objShell=CreateObject("Shell.Application")$objFldr.CopyHere($sSrc,$lFlags)... blah blah... insert research hereLar.<{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 More sharing options...
steveR Posted March 18, 2005 Share Posted March 18, 2005 Latest beta:http://www.hiddensoft.com/fileman/users/jpm/AutoIt3-gui/ AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
buzz44 Posted March 18, 2005 Share Posted March 18, 2005 i wanted to do this b4, use CMD "xcopy" to do it by using _RunDOS qq Link to comment Share on other sites More sharing options...
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