Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pop a msg with an hta? 1

Status
Not open for further replies.

jfdabiri

MIS
Feb 27, 2007
282
US
hi,
i have an hta app that uses vbscript. is there a way to pop a msg for 5 or 6 seconds? i know this can be done in vbscript using wscript.shell, but i'm not sure how to do it in hta.
thanks.
 
Have a look at the WshShell.Popup method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It is the same as you normally do it with VBScript.

If you're using WScript.CreateObject("WScript.Shell") in VBScript then simply use CreateObject("WScript.Shell") in your HTA.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
i have this code in vbscript. it works in vbscript, but when i put it in hta, it gives an error msg:
error: object required: wscript
Code:
set WshShell = WScript.CreateObject("WScript.Shell")

BtnCode = WshShell.Popup("this message will remain for only 5 seconds", 5, "Answer This Question:", 4 + 32)
i'm not sure wscript can be used in hta. is that right?
thanks.

 
Just do:

set WshShell = CreateObject("WScript.Shell")

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top