View Single Post
Old 07-01-2009   #7 (permalink)
Todd Vargo


 
 

Re: Pop-up message...


"Steven Sinclair" <StevenSinclair@xxxxxx> wrote in
message news:52748538-4FE2-4C49-9971-2BB9A7626D40@xxxxxx
Quote:

> So, then, what are my options? I'm merely trying to display an
> automatically-timing out informational message to the user. I simply don't
> want any user interaction other than the display of the actual message.
>
> Thanx.
The code you posted displays the message for 3 seconds and then goes away on
it's own. "With no buttons" sounds like you want to create a nag screen
which the user can not dismiss.

'NagPopup.vbs
Option Explicit

Dim NagTime, Nag, Msg, Title, WSHShell
NagTime = 5 'Seconds to nag user

Set WshShell = WScript.CreateObject("WScript.Shell")
Nag = DateAdd("s", NagTime, Now())
Title = "Be patient:"

Do
Msg = "This nag message will go away in " & CStr(NagTime) & " seconds."
'Replace NagTime below with 1 for an anoying countdown.
WshShell.Popup Msg, NagTime, Title, 16
NagTime = DateDiff("s", Now(), Nag)
Loop While Nag > Now

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

My System SpecsSystem Spec