Polaris
Polaris

Reputation: 3793

Visual Basic Script simple time elapsed

I want to show message to user when 3 minutes passed in VBS.

Upvotes: 1

Views: 550

Answers (2)

Tim Coker
Tim Coker

Reputation: 6524

If you're doing shell scripting, the following will work

WScript.Sleep 500 'this parameter is in milliseconds, this is 1/2 a second.
MsgBox "OK"

If you're doing web dev, you're better off using javascript

setTimeout("alert('OK')",500); //this is milliseconds again

Upvotes: 2

Hans Olsson
Hans Olsson

Reputation: 55009

Do you mean that you want the script to wait for 3 minutes and then show a messagebox? If so try this:

WScript.Sleep(180000)
MsgBox("Your 3 minutes are up, we're all going to die!")

Upvotes: 1

Related Questions