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.28
Batch tool to show a message in a MessageBox and return the caption
of the button that is clicked

Usage:	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

Notes:	Whereas all arguments are optional, each argument requires
	all preceding arguments, i.e. icon requires "message", "title"
	and buttons, but not necessarily default, option and timeout.
	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: 2017-03-25, 21:31