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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

message box vs pop up

Status
Not open for further replies.

Briandr

MIS
Jul 11, 2003
177
0
0
US
Hi Guys,

Maybe someone answered this in reply to one of my other postings. Sorry if I asked twice, but just looking for clarification. Will a message box or pop up timeout via inactivity timer? Does it depend on the operating system? I was led to believe a message box would not timeout whereas a pop up would. I been testing a script using the message box. On a Windows 7 x64 system it did not disappear period. I let it sit over night. On a Windows XP x32 system it disappeared after some time. I can't recall how long, but I want to say it was gone within 1 or 2 hours. So irregardless of the platform (x32 or x64) or operating system which is the best one to use so the box (pop up or message box) stays and does not disappear?

Thanks.
 
MsgBox does not include a timeout:

Wscript.Shell popup DOES allow for an optional timeout

This code shows a popup, and then disappears after 5 seconds on my Win7 x64 box:
Code:
Dim objShell, intButton
set objShell = CreateObject("Wscript.Shell")
intButton = objShell.Popup("This test box will disappear in 5 seconds...", 5)

Test it out.
 
And what I said above should be true on both 32-bit and 64-bit OS's. As strongm pointed out in your other thread, both methods are the same, popup just gives you one extra option (a timeout). And note that the timeout value is in seconds.
 
Hi,

Well in the case of a Windows 7 32-bit system the message box did disappear. Could it because the script was execute with cscript as opposed to Wscript?


What about running cscript with a T//:32767 switch. I believe that converts 32767 seconds to about 9 hours. Thanks.
 
>the message box did disappear

May have done. Shouldn't have done. Almost certainly disappeared for some other reason (e.g. parent process got terminated for some unknown reason). So if you force the parent to close, then the messagebox will close.

>Could it because the script was execute with cscript as opposed to Wscript?

No
 
Check the wscript host settings (just double-click c:\windows\system32\wscript.exe). There is an option to "Stop script after specified number of seconds". Also, consider what strongm said about a parent process. I recall a proxy method being as suggested in another thread of yours.

-Geates

 
Thanks guys. I actually have a question back in that other thread so I don't want to mix oranges and apples (could not think of anything better)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top