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..."
When some of the Virtual Machines on a 2008 Hyper-V server are shutdown, the status in the Hyper-V management console goes to "Merge in...
Virtual Server
Pure Vb script progress or status bar
I am looking for something really simple. Everything I have found on the web is using HTA or something really complicated. I wrote a script to...
VB Script
Sync Center suddenly lost Progress Bar and Sync status
I opened Sync Center today when synchronizing to my WM device and I noticed during sync the Progress Bar is missing.... how do I get it back? ...
Vista General
Defrag status/progress information
Is there a way to perform an analysis of the fragmentation level of a drive in Vista Home Premium? I miss being able to see a graphic...
Vista General
Progress
Hi! Is there anyway to display any kind of progress when doing some big loop using foreach? I need to compare all files from dvd ( 5MB each so a...
PowerShell
Reading the Powershell progress bar (activity + progress) with C#
hi, i have an application which uses the Exchange Management Console (2007). It uses it through the RunSpace object (the code is written in C#)....
PowerShell
zero progress
Downloaded 2 programs today... 1 a game and the other Windows Live Messenger. On both occasions I have run the install/setup program and done the...
Vista General