Status indicator 
Author Message
 Status indicator

Those are too complex for my scripting ability....

Is there a way to display the word "processing" while a loop is executing,
and have it disappear when it's finished?

Thanks.



Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator

This script will only run under CScript. This is .wsf format so you can have
both JScript and VBScript versions. You can strip just the script code out
and put it into a .js or .vbs file as appropriate, if you wish. This code is
not tested, but the principals are there.

<package>
<job id="js_version">
<script language="JScript">

var stdout = WScript.StdOut;

var message = "Processing...";

// Output the message
stdout.Write(message);

// do something here

// Erase the message
for (var i = 0; i < message.length; i++)
    stdout.Write(unescape("%08"));

</script>
</job>
<job id="vbs_version">
<script language="VBScript">

Dim StdOut : Set StdOut = WScript.StdOut
Dim Message : Message = "Processing..."

' Output the message
StdOut.Write Message

' Do something here

' Erase the message
For i = 1 to Len(Message)
    StdOut.Write Chr(8)
Next

</script>
</job>
</package>

Mike Whalen
Windows Script Dev


Quote:
> Those are too complex for my scripting ability....

> Is there a way to display the word "processing" while a loop is executing,
> and have it disappear when it's finished?

> Thanks.



Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator
I'd like to display something on the screen while a script is running, to
indicate that it is still processing.  Remember in some DOS programs you
would see, as a process indicator,  these symbols displayed in the same
screen location:   / -- | \   , and it would appear to be a twirling line.
I'm a script newbie, and I can not find anywhere, how to display
something/anything, while a process is running, that doesn't require the
user to click on Ok, to make the something/anything disappear.  Thanks.


Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator
there are a couple of progress dialogs on Clarence's website,

- one by me called wscProgressDialog,
- and, Clarence's Logon Object can also be used as a Progress Dialog.

    http://cwashington.netreach.net

hth, jw


Quote:
> I'd like to display something on the screen while a script is running, to
> indicate that it is still processing.  Remember in some DOS programs you
> would see, as a process indicator,  these symbols displayed in the same
> screen location:   / -- | \   , and it would appear to be a twirling line.
> I'm a script newbie, and I can not find anywhere, how to display
> something/anything, while a process is running, that doesn't require the
> user to click on Ok, to make the something/anything disappear.  Thanks.



Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator

Quote:

>This script will only run under CScript.

not to beat a dead horse here... but i too am a vb beginner...
all my learning efforts right now are on using WSH...

could you pls show how this would be done using just WSH?

would appreciate it...

best regards,

Hank

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator
Just copy the code inside the <script...> </script> tags to ordinary .js or .vbs files.

--
Michael Harris
MVP Scripting



Quote:

>This script will only run under CScript.

not to beat a dead horse here... but i too am a vb beginner...
all my learning efforts right now are on using WSH...

could you pls show how this would be done using just WSH?

would appreciate it...

best regards,

Hank

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Tue, 17 Sep 2002 03:00:00 GMT  
 Status indicator
You could try this ...

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "This message will close in 5 " & _
  "seconds.", 5, "IMPORTANT NOTICE!", 11 + 48

--
Steve Whitnear
Please do not email.  Reply in newsgroup

Quote:


> >This script will only run under CScript.

> not to beat a dead horse here... but i too am a vb beginner...
> all my learning efforts right now are on using WSH...

> could you pls show how this would be done using just WSH?

> would appreciate it...

> best regards,

> Hank

> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!



Thu, 19 Sep 2002 04:00:00 GMT  
 Status indicator
CScript is WSH - the executables for WSH are CScript.exe, for the Console,
and WScript.exe, for a Windows based host. The code contains a
console-specific object (StdOut), so you can't run that with WScript, only
CScript.

You can do this one of several ways, inlcuding (but not limited to):

Take all of the code, put it in a file with the extension .wsf, and run
"cscript foo.wsf".
Take just the JScript portion of it (the bit inbetween <script
language="JScript"> and </script>), put it in a .js file, and call "cscript
foo.js".
Do the same, but with the VBScript section, and use the .vbs extension.

Mike Whalen
Windows Script Dev


Quote:


> >This script will only run under CScript.

> not to beat a dead horse here... but i too am a vb beginner...
> all my learning efforts right now are on using WSH...

> could you pls show how this would be done using just WSH?

> would appreciate it...

> best regards,

> Hank

> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!



Thu, 19 Sep 2002 04:00:00 GMT  
 Status indicator
So close yet so far....

I am using Wscript to run my script, so I can't use the stdOut call.... I
get an error message if I do.

Guess this is just a limitation of WSH....  this sure seems like a
functionality that should be added.   The WSH wish list.....



Fri, 20 Sep 2002 03:00:00 GMT  
 Status indicator
That was just one way of doing it - I was assuming you could use the
console. There are objects available on various websites (C. Washington's,
for instance) that may do what you want. Or, you could use IE for the GUI,
though that'd be overkill for just a progress dialog.

Mike Whalen
Windows Script Dev


Quote:
> So close yet so far....

> I am using Wscript to run my script, so I can't use the stdOut call.... I
> get an error message if I do.

> Guess this is just a limitation of WSH....  this sure seems like a
> functionality that should be added.   The WSH wish list.....



Fri, 20 Sep 2002 03:00:00 GMT  
 Status indicator
Quote:
>Just copy the code inside the <script...> </script> tags to

ordinary .js or .vbs files.

right... but what i meant was more along the lines of using
command more along the lines of vb rather than jscript.

i think it's fantastic that you can use the same code without
having to look-up command equivalents... but for a newbie like
myself... it's tough enough learning enough learning just the vb
side of things... looking at some of the jscript stuff... looks
more like c... which i have even less skills in...

so again, was looking for something, more along the lines of
solving the same task... using vb command equivalents...

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Fri, 20 Sep 2002 03:00:00 GMT  
 Status indicator
Popup Method
http://msdn.microsoft.com/scripting/windowshost/doc/wsMthPopup.htm

48 is the "magic number"...

BTW, the 11 is actually an undocumented hack that works only on Win9x to suppress any buttons.

--
Michael Harris
MVP Scripting

On a side question....

what part of the below tells it to create within the msg box, the
yellow triangle with the exclamation mark?

-T-

On Sun, 2 Apr 2000 19:58:58 +0100, "Steve Whitnear"

Quote:

>You could try this ...

>Set WshShell = WScript.CreateObject("WScript.Shell")
>WshShell.Popup "This message will close in 5 " & _
>  "seconds.", 5, "IMPORTANT NOTICE!", 11 + 48



Sat, 21 Sep 2002 03:00:00 GMT  
 Status indicator
It doesn't show anything, as if the PopUp method was never called. The PopUp fails to work but does
not throw a runtime error.

--
Michael Harris
MVP Scripting

On Tue, 4 Apr 2000 19:40:08 -0700, "Michael Harris"

Quote:

>Popup Method
>http://msdn.microsoft.com/scripting/windowshost/doc/wsMthPopup.htm

>48 is the "magic number"...

>BTW, the 11 is actually an undocumented hack that works only on Win9x to suppress any buttons.

What does it show on an NT machine?

-T-



Sun, 22 Sep 2002 03:00:00 GMT  
 Status indicator
J Warrington  has some very nice WSH progress/status
bar "scriptlets"  He can be found at

http://home.att.net/~wshvbs/wshCode
Some of them require FM20.DLL (which is downloadable as well).
The scriptlets are WSC files, but easily registerable once
downloaded.

-Robert

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



Tue, 24 Dec 2002 03:00:00 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Server status indicator

2. Progress indicator

3. Help:add a page number indicator in .ps file

4. Process Indicator

5. Processing or Progress Indicators - POLL

6. Progress indicator - HELP!!!

7. Progress Indicator?

8. Progress indicator

9. HOWTO: Check return values, boot status and (de)install status of MSI installations (Was: Problem with VBScript SUB for uninstalling .MSI packages)

10. HOWTO: Check return values, boot status and (de)install status of MSI installations (Was: Problem with VBScript SUB for uninstalling .MSI packages)

11. status bar

12. ie 6 status bar + proxy setting

 

 
Powered by phpBB® Forum Software