Rob van der Woude's Scripting Pages

Help text for MessageBox.cs

(view help text of MessageBox.cs as plain text)

MessageBox.exe,  Version 1.30
Batch tool to show a message in a MessageBox and return the caption
of the button that is clicked

Usage:	MessageBox "message" [ "title" ]  [ switches ]

   or:	MessageBox "message" "title" buttons icon default [option] timeout

Where:	buttons	"AbortRetryIgnore", "OK", "OKCancel",
		"RetryCancel", "YesNo" or "YesNoCancel"
	icon	"Asterisk", "Error", "Exclamation", "Hand",
		"Information", "None", "Question", "Stop"
		or "Warning"
	default	"Button1", "Button2" or "Button3" or the
		default button's (English) caption
	option	"HideConsole", "NoEscape", "RightAlign",
		"RtlReading", "None" or ""
	timeout	timeout interval in seconds

Switches:	/B:buttons	A = AbortRetryIgnore, O = OK,
        			C = OKCancel, R = RetryCancel,
        			Y = YesNo, N = YesNoCancel
            	/I:icon        	A = Asterisk, E = Error,
        			X = Exclamation, H = Hand,
        			I = Information, N = None,
        			Q = Question, S = Stop
        			W = Warning
            	/D:default    	1 = Button1, 2 = Button2,
        			3 = Button3 or use the default
        			button's (English) caption
            	/O:option     	H = HideConsole, N = NoEscape,
        			R = RightAlign, L = RtlReading
            	/T:timeout	timeout interval in seconds

Notes:	Use switches if you want to skip arguments.
	Always specify buttons BEFORE specifying default.
	Using the "HideConsole" option will hide the console
	window permanently, thereby disabling all console based
	user interaction (e.g. "ECHO" and "PAUSE").
	It is meant to be used in scripts that run "hidden"
	themselves, e.g. VBScript with the WScript.exe interpreter.
	Do not use this option in a batch file unless hiding
	the console window permanently is intended.
	Linefeeds (\n or \012 and/or \r or \015), tabs (\t or \007),
	singlequotes (' or \047) and doublequotes (\" or \042)
	are allowed in the message string.
	Escaped Unicode characters (e.g. "\u5173" for "?")
	are allowed in the message string and in the title.
	Use option "NoEscape" to disable all character escaping
	except doublequotes (useful when displaying a path).
	The (English) caption of the button that was clicked
	is returned as text to Standard Output (in lower case),
	or "timeout" if the timeout interval expired.
	Code to hide console by Anthony on:
	MessageBox timeout based on code by DmitryG on:
	Note that when using the timeout feature, A window
	with the current MessageBox's TITLE will be closed,
	not necessarily the current MessageBox. To prevent
	closing the wrong MessageBox, use unique titles.
	The return code of the program is 0 if a button was clicked,
	1 in case of (command line) errors, 3 if the timeout expired.

Written by Rob van der Woude

page last uploaded: 2019-01-21, 22:48