David
Joined: 08 Aug 2004 Posts: 25 Location: Lubbock, Texas
|
Posted: Thu Sep 09, 2004 9:11 pm Post subject: Progress bar example |
|
|
I hadn't seen many examples of the Progress command so I worked through a silly example in case I need to use Progress in the future. All this example does is display the names of all the files in the C:\windows\system32\ directory. Any and all suggestions for improvement are welcome.
| Code: | #+^z::
; count files in C:\windows\system32\
n = 0
Loop, %windir%\system32\*.*
{
n++
}
; display progress bar
Progress, M, %A_Space%, Just displaying filenames ..., System32 Files
m = 0.0
Loop, %windir%\system32\*.*
{
x = %m%
EnvDiv, x, %n%
EnvMult, x, 100
Progress, %x%, %A_LoopFileName%, Just displaying filenames ...
EnvAdd, m, 1
}
Progress, Off
MsgBox, , System32 Files, Done!
Return
|
|
|