AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Progress bar example

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
David



Joined: 08 Aug 2004
Posts: 25
Location: Lubbock, Texas

PostPosted: Thu Sep 09, 2004 9:11 pm    Post subject: Progress bar example Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group