Help for InputBox class ──────────────────────── Present a prompt for input dialog, and return the text entered COM ProgID: RobvanderWoude.InputBox ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Properties (Note that all properties are string or integer, no booleans, objects or arrays) │ │ │ ╞══════════════════════╤════════════════════════════════════════════════════╤═══════════╤═══════════╤══════════════════════════════════════════╡ │ Property Name │ Description │ Mandatory │ Read-Only │ Default (Allowed) Values │ ╞══════════════════════╪════════════════════════════════════════════════════╪═══════════╪═══════════╪══════════════════════════════════════════╡ │ allowshowpassword │ Add "Show password" checkbox (0=false; 1=true) │ no │ no │ 0: no checkbox │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ asciionly │ Allow only ASCII characters (0=false; 1=true) │ no │ no │ 0: allow all │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ captioncancel │ Caption for "Cancel" button │ no │ no │ Cancel │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ captionok │ Caption for "OK" button │ no │ no │ OK │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ captionshowpassword │ Text for "Show password" checkbox │ no │ no │ Show password │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ debuginfo │ A log of actions for debugging │ N/A │ YES │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ errors │ List of errors with current settings │ N/A │ YES │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ fontfamily │ Font family used in dialog │ no │ no │ Microsoft Sans Serif │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ fontsize │ Font size used in dialog │ no │ no │ 10 (6..48) │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ hidepassword │ Hide input, for password dialogs (0=false; 1=true) │ no │ no │ 0: show input │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ initialinput │ Initial input (e.g. expected value) │ no │ no │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ input │ Input as typed in text field │ no │ no │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ left │ Offset of window from left screen border │ no │ no │ Centered (0..screenwidth-windowwidth) │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ localizecaptions │ Use localized button captions (0=false; 1=true) │ no │ no │ 0: English captions │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ mask │ Optional mask to apply to input │ no │ no │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ maskedinput │ Masked input, i.e. including mask literals │ no │ no │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ modal │ Modal dialog, i.e. always on top (0=false; 1=true) │ no │ no │ 1: always on top │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ passwordchar │ Character used to hide input │ no │ no │ * │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ prompt │ Optional text above controls │ no │ no │ Prompt │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ regexcasesensitive │ Case sensitive regexes (0=false; 1=true) │ no │ no │ 1: case sensitive │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ regexendresult │ Regex pattern applied to submitted input │ no │ no │ .* │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ regexonthefly │ Regex pattern applied at eacht change of input │ no │ no │ .* │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ showpassword │ "Show password" checkbox status (1=checked) │ no │ no │ 0: not checked │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ timeout │ Optional dialog timeout in seconds (0=no timeout) │ no │ no │ 0 │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ timeoutelapsed │ Timeout elapsed status (0=false; 1=true) │ N/A │ YES │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ title │ Dialog window title │ no │ no │ Title │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ top │ Offset of window from top of screen │ no │ no │ Centered (0..screenheight-windowheight) │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ Version │ Show this DLL's version │ N/A │ YES │ │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ windowheight │ Height of dialog window │ no │ no │ 110 (110..screenheight) │ ├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤ │ windowwidth │ Width of dialog window │ no │ no │ 200 (200..screenwidth) │ └──────────────────────┴────────────────────────────────────────────────────┴───────────┴───────────┴──────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Methods │ │ │ ╞════════════════════╤════════════════════════════════════════════════════════════════════════════╤════════════════════════════════════════════╡ │ Method Name │ Description │ Requirements │ ╞════════════════════╪════════════════════════════════════════════════════════════════════════════╪════════════════════════════════════════════╡ │ CheckUpdate │ Check the developer's website for updates │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ Credits │ Shows credits │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ Help │ Returns this help text as plain text, or if optional parameter equals 1, │ │ │ │ as html │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ ListProperties │ Returns a list of this class' properties as key=value pairs (1 per line) │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ MaskLanguageTable │ Returns a table with an overview of the MaskedTextBox's masking language │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ SampleCode │ Returns VBScript sample code for this dialog │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ Show │ Presents a prompt for input dialog based on the current property values, │ │ │ │ and if "OK" is clicked, saves the entered input in the "input" property. │ │ │ │ If "mask" is specified, a masked textbox will be used, and if the entered │ │ │ │ text complies to the mask, it will be saved unmasked (without the mask │ │ │ │ literals) in the "input" property and masked (including mask literals) in │ │ │ │ the "maskedinput" property. │ │ │ │ If "Cancel" is clicked, or if the entered input does not comply to the │ │ │ │ mask or does not match the regular expressions, "input" and "maskedinput" │ │ │ │ will both be empty. │ │ └────────────────────┴────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────┘ VBScript usage example: ─────────────────────── Set objInputBox = CreateObject( "RobvanderWoude.InputBox" ) With objInputBox .prompt = "Enter a MAC address" .title = "MAC Address" .initialinput = "0022446688AACCEE" .mask = ">CC\:CC\:CC\:CC\:CC\:CC\:CC\:CC" .regexendresult = "[\dA - F]{16}" .regexonthefly = "[\dA-F]{0,16}" .regexcasesensitive = 0 .timeout = 120 .Show WScript.Echo "New MAC address: " & .input & " (" & .maskedinput & ")" WScript.Echo WScript.Echo .ListProperties( ) End With Set objInputBox = Nothing