Re: MsgBox to display while processing
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 03/13/05
- Next message: Keith Miller: "When is 'IsBrowseable' True?"
- Previous message: Torgeir Bakken \(MVP\): "Re: problem running a dos cmd from a VBS file"
- In reply to: D.P. Roberts: "MsgBox to display while processing"
- Next in thread: D.P. Roberts: "Re: MsgBox to display while processing"
- Reply: D.P. Roberts: "Re: MsgBox to display while processing"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 13 Mar 2005 18:31:47 +0100
D.P. Roberts wrote:
> Hopefully there is a simple solution to my dilemma. I have a script as
> follows:
>
> 1. A MsgBox is displayed to ask user if they want to proceed.
> 2. After they click Yes, the MsgBox disappears and the script begins
> processing.
> 3. Processing takes about 30 seconds to complete.
> 4. After the processing has completed, a MsgBox is displayed to inform the
> user the process has completed.
>
> I'd like to have a MsgBox display during the 30 seconds of processing to
> tell the user to "Please wait." I don't need a progress bar or anything
> fancy like that - just a simple message so the user doesn't think the script
> has hung.
>
> Is this possible?
Hi
Here is a couple of alternatives for you:
A)
You can roll your own MsgBox function, using an Internet Explorer
instance from your VBScript.
See e.g. the two MsgBox examples here for a starting point:
T Lavedas' WSH Scripts
http://www.pressroom.com/~tglbatch/wshindex.html
In this link there is a modified version of an example by Joe Earnest
(progress bar is removed), where I use the window to display the
installation progress of some security updates:
http://groups.google.co.uk/groups?selm=%23hgK37KoEHA.2764%40TK2MSFTNGP11.phx.gbl
Some more examples without a progress bar but where you can dynamically
put out information about what is going on :
http://groups.google.co.uk/groups?selm=3EA302E5.5BAE90EB%40hydro.com
B)
HTA:
You could consider using HTA (HTML Application) instead (*.HTA files
are in a way HTML files hosted by mshta.exe instead of iexplore.exe):
HTML Applications (HTAs)
http://msdn.microsoft.com/workshop/author/hta/hta_node_entry.asp
A couple of HTA examples for you:
http://groups.google.co.uk/groups?selm=%23QAI7UtkAHA.1968%40tkmsftngp04
When running the example in the link above, fill in e.g.
Win32_OperatingSystem in the Enumerate field
http://groups.google.co.uk/groups?selm=%23wIsRfZoCHA.2280%40TK2MSFTNGP12
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: Keith Miller: "When is 'IsBrowseable' True?"
- Previous message: Torgeir Bakken \(MVP\): "Re: problem running a dos cmd from a VBS file"
- In reply to: D.P. Roberts: "MsgBox to display while processing"
- Next in thread: D.P. Roberts: "Re: MsgBox to display while processing"
- Reply: D.P. Roberts: "Re: MsgBox to display while processing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|