![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Progress Status All, Was wondering if there was a way to show the status of a script by doing something like the following: C:\Script in Progress...10% then when the script continues it will look like this C:\Script in Progress...20% I would like to do this so it doesnt take up the whole screen with a bunch of "..........". If I have 300000 loops, that is a lot of periods. I know how to figure out the percentage. Just need to know how to replace the text... Thanks Craig |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Progress Status Quote: > > Was wondering if there was a way to show the status of a script by doing > something like the following: > > C:\Script in Progress...10% > > then when the script continues it will look like this > > C:\Script in Progress...20% > > I would like to do this so it doesnt take up the whole screen with a bunch > of "..........". If I have 300000 loops, that is a lot of periods. I Quote: > how to figure out the percentage. Just need to know how to replace the > text... If you're using an HTA you can use script to replace the text. You could also leave the basic text the way it is, use a LABEL for the number, and change the LABEL innertext property. If you use STYLE to set the font, etc. of both a span and a label you should be able to make it look blended: <HTML> <HEAD> <TITLE></TITLE> <SCRIPT LANGUAGE="VBScript"> Sub Count(NumberValue) LabCounter.innerText = NumberValue End Sub </SCRIPT> </HEAD> <BODY onload="Count(30)"> <SPAN ID="counter"> Curent progress... <LABEL ID="LabCounter"></LABEL></SPAN> </BODY></HTML> |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Progress Status Sorry, I should have specified that I want this to update in the command window. So it will look something like this: C:\cscript script.vbs C:\Script in Progress...10% .... C:\Script in Progress...20% Just want the percentage to change... Thanks Craig "mayayana" wrote: Quote: > Quote: > > > > Was wondering if there was a way to show the status of a script by doing > > something like the following: > > > > C:\Script in Progress...10% > > > > then when the script continues it will look like this > > > > C:\Script in Progress...20% > > > > I would like to do this so it doesnt take up the whole screen with a bunch > > of "..........". If I have 300000 loops, that is a lot of periods. I Quote: > > how to figure out the percentage. Just need to know how to replace the > > text... > Replace the text where? You didn't say. > If you're using an HTA you can use script > to replace the text. You could also leave > the basic text the way it is, use a LABEL > for the number, and change the LABEL > innertext property. If you use STYLE to > set the font, etc. of both a span and a label > you should be able to make it look blended: > > <HTML> > <HEAD> > <TITLE></TITLE> > <SCRIPT LANGUAGE="VBScript"> > Sub Count(NumberValue) > LabCounter.innerText = NumberValue > End Sub > </SCRIPT> > </HEAD> > <BODY onload="Count(30)"> > <SPAN ID="counter"> Curent progress... <LABEL > ID="LabCounter"></LABEL></SPAN> > </BODY></HTML> > > > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Progress Status "MacMan0295" <MacMan0295@xxxxxx> wrote in message news:8CD2C53A-5CAD-4B2F-9BF0-4C5854088AF5@xxxxxx Quote: > All, > > Was wondering if there was a way to show the status of a script by doing > something like the following: > > C:\Script in Progress...10% > > then when the script continues it will look like this > > C:\Script in Progress...20% > > I would like to do this so it doesnt take up the whole screen with a bunch > of "..........". If I have 300000 loops, that is a lot of periods. I > know > how to figure out the percentage. Just need to know how to replace the > text... 'WScript.StdOut.Write' to write the percentage & when it changes, write backspaces and then the new percentage. See code below for a simple example. Make sure to run it from cscript. It will throw an exception if run from wscript. WScript.StdOut.Write "Script in Progress...00%" For i = 1 to 10 WScript.Sleep 1000 WScript.StdOut.Write String(3, Chr(08)) & CStr(i * 10) & "%" Next |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Progress Status Craig wrote: Quote: > > Was wondering if there was a way to show the status of a script by doing > something like the following: > > C:\Script in Progress...10% > > then when the script continues it will look like this > > C:\Script in Progress...20% > > I would like to do this so it doesnt take up the whole screen with a bunch > of "..........". If I have 300000 loops, that is a lot of periods. I > know > how to figure out the percentage. Just need to know how to replace the > text... indicating progress. The program is linked here: http://www.rlmueller.net/IE%20Display.htm -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Progress Status This is exactly what I was looking for. Thank you for all the help. Craig "James Whitlow" wrote: Quote: > "MacMan0295" <MacMan0295@xxxxxx> wrote in message > news:8CD2C53A-5CAD-4B2F-9BF0-4C5854088AF5@xxxxxx Quote: > > All, > > > > Was wondering if there was a way to show the status of a script by doing > > something like the following: > > > > C:\Script in Progress...10% > > > > then when the script continues it will look like this > > > > C:\Script in Progress...20% > > > > I would like to do this so it doesnt take up the whole screen with a bunch > > of "..........". If I have 300000 loops, that is a lot of periods. I > > know > > how to figure out the percentage. Just need to know how to replace the > > text... > If you are doing this from a cscript window, you could use > 'WScript.StdOut.Write' to write the percentage & when it changes, write > backspaces and then the new percentage. See code below for a simple example. > Make sure to run it from cscript. It will throw an exception if run from > wscript. > > WScript.StdOut.Write "Script in Progress...00%" > For i = 1 to 10 > WScript.Sleep 1000 > WScript.StdOut.Write String(3, Chr(08)) & CStr(i * 10) & "%" > Next > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Pure Vb script progress or status bar | VB Script | |||
| Sync Center suddenly lost Progress Bar and Sync status | Vista General | |||
| Defrag status/progress information | Vista General | |||
| Reading the Powershell progress bar (activity + progress) with C# | PowerShell | |||
| zero progress | Vista General | |||