Timed message box
Tell a friend about this page
You are visitor number:
Can Do
Goto Guest book sign in page [Home]
Timed messagebox - Non API:


Here is a Non API way to initiate a timed messagebox using Microsoft Windows Script Technologies, in this case we are using the;

Get workbook here:


Windows Script Host
The Microsoft Windows Script Host (WSH) is a tool that will allow you to run Visual Basic Scripting Edition and JScript natively within the base Operating System, either on Windows 95 or Windows NT 4.0.


If you are currently using Windows 2000 or Windows ME, you have version 2.0 of WSH installed on your computer system. If you are running Windows 95, 98, or Windows NT 4.0, you have version 1.0. To upgrade to WSH 5.6, visit the Microsoft Windows Script Technologies Web site at

Updated link 16 Apr 2007
http://msdn2.microsoft.com/en-us/library/ms950396.aspx


Note: The latest version of WSH is 5.6 due to a file versioning issue that was easiest to resolve by skipping some version numbers.

  • The basic syntax required:

    From Help files, Constants added in for you to use as required (same as VBA)

  
WshShell.Popup(strText, nSecondsToWait, strTitle, nType, IntButton)
Arguments
object
WshShell object.
strText
String value containing the text you want to appear in the pop-up message box.
nSecondsToWait
Optional. Numeric value indicating the maximum length of time (in seconds) you want the pop-up message box displayed.
strTitle
Optional. String value containing the text you want to appear as the title of the pop-up message box.
nType
Optional. Numeric value indicating the type of buttons and icons you want in the pop-up message box. These determine how the message box is used.
IntButton
Integer value indicating the number of the button the user clicked to dismiss the message box. This is the value returned by the Popup method.
Remarks
The Popup method displays a message box regardless of which host executable file is running (WScript.exe or CScript.exe). If nSecondsToWait equals zero (the default), the pop-up message box remains visible until closed by the user. If nSecondsToWaitis is greater than zero, the pop-up message box closes after nSecondsToWait seconds. If you do not supply the argument strTitle, the title of the pop-up message box defaults to "Windows Script Host." The meaning of nType is the same as in the Microsoft Win32® application programming interface MessageBox function. The following tables show the values and their meanings. You can combine values in these tables.
Note   To display text properly in RTL languages such as Hebrew or Arabic, add hex &h00100000 (decimal 1048576) to the nType parameter.
Google
Search WWW Search My Site!

This page was last updated on: November 29 2002