Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


DeCOMtamination: Progress Bar

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,41561
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> DeCOMtamination: Progress Bar
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 DeCOMtamination: Progress Bar - 12/31/2006 9:16:40 PM   
  TNO


Posts: 1040
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
Next up on the platter, A slick progress bar:

Save this as progress.html:

      

In your HTA or HTML do this to start the progress bar:

      
This will assign the progress bar to a variable and keep the window on top at all times. when the progress bar reaches 100% it will close itself

How to update the progress bar:

First you should determine the total length of the items you are going through, wether it be the length of an array, or total number of objects.
Inside your loop update the progress bar like this:

progress.progress(current index,Total Elements - 1); //0 based array

To update the message in the progress bar:

progress.getElementById("message").innerText="Checking hidden files"

Example to play with:

test.hta

      

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...
 
 
Post #: 1
 
 RE: DeCOMtamination: Progress Bar - 1/8/2007 5:15:42 AM   
  dm_4ever


Posts: 2254
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
This is definitely a slick progress bar.   It doesn't seem to close automatically for me though. No errors or anything. Any ideas?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to TNO)
 
 
Post #: 2
 
 RE: DeCOMtamination: Progress Bar - 1/8/2007 9:00:48 AM   
  TNO


Posts: 1040
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I didn't set the sample up to close itself for display purposes. The fix is simple though:

  for(var i=0;i<4001;i++){
      progress.progress(i,4000)
  }

Its standard practice in loops to have 1 extra in the total loop count since arrays/indexes are 0 based vs the length value of most objects.

_____________________________

Consolidated Script Component: The Acid Test

A universe of complexity...

(in reply to dm_4ever)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> DeCOMtamination: Progress Bar Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts