Windows Vista Forums

Progress Status

  1. #1


    MacMan0295 Guest

    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 SpecsSystem Spec

  2. #2


    mayayana Guest

    Re: Progress Status


    >
    > 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...
    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 SpecsSystem Spec

  3. #3


    MacMan0295 Guest

    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:

    >

    > >
    > > 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...
    >
    > 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 SpecsSystem Spec

  4. #4


    James Whitlow Guest

    Re: Progress Status

    "MacMan0295" <MacMan0295@xxxxxx> wrote in message
    news:8CD2C53A-5CAD-4B2F-9BF0-4C5854088AF5@xxxxxx

    > 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 SpecsSystem Spec

  5. #5


    Richard Mueller [MVP] Guest

    Re: Progress Status

    Craig wrote:

    >
    > 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...
    I have an exampe VBScript program that uses IE to display a dynamic message
    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 SpecsSystem Spec

  6. #6


    MacMan0295 Guest

    Re: Progress Status

    This is exactly what I was looking for. Thank you for all the help.

    Craig

    "James Whitlow" wrote:

    > "MacMan0295" <MacMan0295@xxxxxx> wrote in message
    > news:8CD2C53A-5CAD-4B2F-9BF0-4C5854088AF5@xxxxxx

    > > 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 SpecsSystem Spec


Progress Status
Similar Threads
Thread Forum
Hyper-V - shutdown VM - status shows "merge in Progress..." Virtual Server
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