Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Running a Progress Bar while Other fucntions running

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Running a Progress Bar while Other fucntions running
  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 >>
 Running a Progress Bar while Other fucntions running - 4/23/2008 6:58:51 AM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
I have a  class that is a progress bar that works great. I have a bunch of functions that do certain things and one main function that calls each of these functions one after another to do thier jobs. What i want to do is to display the progress bar and while the functions are doing thier job simply have the progress bar alert them that this functions is taking place. I am not sure if I can how to do this in VBscript though. In each function I can call the Progress Bar class and set the time of the progress bar to a certain length to allow for each function to do its job. However when I call the Progress Bar class from each function it does not run the function until the Progress Bar is complete. This is fine for most of the functions as the functions may only take a few seconds to complete. But some of the functions can take up to 20 seconds to complete and I do not want to have to wait an additional 20 seconds after the progress bar is done to run the functions job and then move on. Is there a away to have the progress bar run along with the Function at the same time? Or set the progress Bar to run and then start calling all the other functions while the progress bar is running?

Thanks
 
 
Post #: 1
 
 RE: Running a Progress Bar while Other fucntions running - 4/23/2008 7:08:51 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
That would depend on how the progress bar is coded.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to blazted)
 
 
Post #: 2
 
 RE: Running a Progress Bar while Other fucntions running - 4/23/2008 8:26:18 AM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
This is the progress bar I am using.

http://www.computerperformance.co.uk/ezine/ezine88.htm

It is a great bar But i am not sure how I would make this into one that will run while my other functions are running.

This is the main fucntion I have that I want the progress bar to run while the Function is running


      

< Message edited by blazted -- 4/23/2008 8:28:23 AM >

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Running a Progress Bar while Other fucntions running - 4/23/2008 9:02:12 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
Sounds like what you need is threading. VBScript doesn't support real threading so you have to fake it. Make a script that does the progress bar and call it as a seperate process.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to blazted)
 
 
Post #: 4
 
 RE: Running a Progress Bar while Other fucntions running - 4/23/2008 12:09:16 PM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
Thanks EB. I did that and it worked. However I have to go another route. I am packaging this into a exe and when the exe unpackages them it creates Temp files so I have no way of knowing what the temp file will be called. So I have to go another route.

Is there a way to elimate the OK button on a WSCRIPT.echo? So that the script will continue to run without having the user click the OK button?

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: Running a Progress Bar while Other fucntions running - 4/23/2008 1:33:51 PM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
Use a Popup instead of an echo.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to blazted)
 
 
Post #: 6
 
 RE: Running a Progress Bar while Other fucntions running - 4/24/2008 4:26:38 AM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
Thanks Ebgreen. Is there a way to eliminate the buttons altogether on POPup?

(in reply to ebgreen)
 
 
Post #: 7
 
 RE: Running a Progress Bar while Other fucntions running - 4/24/2008 5:41:29 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
If you want absolutely no buttons you would need to make your own popup using internet explorer or a third party/custom application.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to blazted)
 
 
Post #: 8
 
 RE: Running a Progress Bar while Other fucntions running - 4/24/2008 7:54:20 AM   
  DiGiTAL.SkReAM


Posts: 1183
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Wouldn't this work?
http://www.visualbasicscript.com/m_32390/mpage_1/tm.htm

It's a class that I wrote that gives you a progress bar while your script goes on and does other things.
It should run just fine from a "compiled" script (a packaged .EXE), and cleans up after itself pretty well.


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to ebgreen)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Running a Progress Bar while Other fucntions running 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