Help for OpenFileBox class ─────────────────────────── Present an Open File dialog, and return the selected file path COM ProgID: RobvanderWoude.OpenFileBox ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Properties (Note that all properties are string or integer, no booleans, objects or arrays) │ │ │ ╞══════════════════╤════════════════════════════════════════════════════╤═══════════╤═══════════╤══════════════════════════════════════════════╡ │ Property Name │ Description │ Mandatory │ Read-Only │ Default (Allowed) Values │ ╞══════════════════╪════════════════════════════════════════════════════╪═══════════╪═══════════╪══════════════════════════════════════════════╡ │ addallfiles │ Add "All files (*.*)" to filter (0=false; 1=true) │ no │ no │ 1 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ addextension │ Add extension if user forgot it (0=false; 1=true) │ no │ no │ 1 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ debuginfo │ A log of actions for debugging │ N/A │ YES │ │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ defaultextension │ Default extension to be added │ no │ no │ │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ errors │ List of errors with current settings │ N/A │ YES │ │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ filter │ File filter │ no │ no │ All files (*.*)|*.* │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ multidotted │ Allow multiple extensions (0=false; 1=true) │ no │ no │ 1 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ multiselect │ Allow selecting multiple files (0=false; 1=true) │ no │ no │ 0 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ readonlychecked │ Checkbox read-only is checked (0=false; 1=true) │ no │ no │ 0 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ selectedfile │ The path of the selected file(s) │ N/A │ YES │ │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ showreadonly │ Show checkbox to open read-only (0=false; 1=true) │ no │ no │ 0 │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ startfolder │ The initial folder for the dialog │ no │ no │ │ ├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤ │ title │ Dialog window title │ no │ no │ DialogBoxes.dll, Version 0.18.1.0 │ └──────────────────┴────────────────────────────────────────────────────┴───────────┴───────────┴──────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ 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) │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ SampleCode │ Returns VBScript sample code for this dialog │ │ ├────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────┤ │ Show │ Presents an Open File dialog based on the current property values, and if │ │ │ │ "OK"is clicked, saves the selected file path in the "selectedfile" │ │ │ │ property (if "Cancel" is clicked, "selectedfile" will be empty). │ │ └────────────────────┴────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────┘ Notes: Though the name may suggest otherwise, this dialog does NOT actually open the selected file, it merely returns the selected file's path. A similar warning goes for the read-only checkbox: it doesn't actually DO anything, but you can use it to allow the user a choice for the actions based on this dialog's result. VBScript usage example: ─────────────────────── Set objOpenFileBox = CreateObject( "RobvanderWoude.OpenFileBox" ) With objOpenFileBox .startfolder = "D:\" .Show WScript.Echo "Selected file: " & .selectedfile WScript.Echo WScript.Echo .ListProperties( ) End With Set objOpenFileBox = Nothing