Re: Display a pop-up Dialog Box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 11:42:54 +0200

Michael Bednarek wrote:

>>You can hide the command prompt if you run PopUp.exe from
>>a VBScript:
>>
>>'--------------------8<----------------------
>>' PopUp.exe is available at
>>' http://gearbox.maem.umr.edu/batch/f_w_util/Frank_Westlake-Freeware.html
>>sPopCmd = "F:\tools\FrankWestlake\PopUp.exe"
>>Set oShell = CreateObject("WScript.Shell")
>>oShell.Run sPopCmd & " /OK /T ""My title"" /M ""My message""", 0, False
>>oShell.Run sPopCmd & " /OK /T ""My title"" /M ""My message2""", 0, False
>>'--------------------8<----------------------
>
>
> I would have thought that once you start using VBS, a PopUp command line
> tool like Frank's becomes obsolete, given that methods like MsgBox or
> PopUp are available within VBS.
Hi

Not in all cases. MsgBox will halt your VBScript to someone press
the OK button, and the same goes for PopUp without a timeout.

If you want a message box on the screen that doesn't halt your script
and that is visible until the user press OK, there is nothing builtin
in VBScript for this (unless you launch secondary "helper" scripts).

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


Relevant Pages

  • Re: Learning
    ... It's somewhat confusing because VBS on Windows ... The early VBS was only a limited browser DOM scripting. ... The Windows Script Host, wscript, has functions of ... is documented in the vbs help file. ...
    (comp.lang.basic.visual.misc)
  • Re: Vbscript script file
    ... Creates a new file with extension .VBS. ... I-Worm.LoveLetter is Internet worm written in the scripting language ... Windows Scripting Host is installed. ...
    (microsoft.public.windowsxp.general)
  • Re: Question about VB scripting
    ... application, copy it, open notepad, and paste it there. ... Note that VBA and VBS are both based on Visual Basic, ... It's scripting capabilitys could ... be very similar to plain VBScript, or it could be quite different. ...
    (microsoft.public.scripting.vbscript)
  • Re: Problems in Waiting for Web page to Open
    ... Michael Harris escreveu: ... not sure if you are saying that vbs just simply CANNOT do ... Microsoft MVP Scripting ...
    (microsoft.public.scripting.vbscript)
  • Re: Why is the Script 5.6 documentation so crummy?
    ... I don't think that the WSH and Windows scripting ... VBS for browser scripting. ...
    (microsoft.public.scripting.vbscript)