The following codes can be used to display various simple dialogs when the command is run. This lets you provide information (like selecting a file or a folder, or entering a string) at "run-time" rather than incorporating the value into the command itself. For more flexibility, you can use a script dialog.
Long form |
Short form |
Description |
---|---|---|
{dlgopen} |
{Rf} |
Displays an Open File dialog, which lets you select an existing filename to pass to the command. |
{dlgmulti} |
{Rm} |
Displays an Open File dialog in multiple selection mode, which lets you select one or more existing files. |
{dlgsave} |
{RF} |
Displays a Save File dialog, which lets you enter a new filename to pass to the command. |
{dlgfolder} |
{Rd} |
Displays a Select Folder dialog, which lets you select a folder to pass to the command. |
{dlgstring} |
{Rs} |
Displays a dialog that lets you enter an arbitrary string. |
{dlgstringS} |
{RS} |
The same as {dlgstring} except the contents of the string field are automatically selected (only applies if a default value is specified - see below). |
{dlgpassword} |
{Rp} |
The same as {dlgstring} except the contents of the string field are obscured - useful for entering passwords. |
{dlgchoose} |
{Rc} |
Displays a drop-down list that lets you choose from a list of values. |
{dlgchooseS} |
{RC} |
The same as {dlgchoose} except the value list is automatically sorted. |
You will almost certainly want to use the following parameters to control the behavior of these codes.
For {dlgsave} you can specify an additional parameter to populate the "Save
as Type" dropdown list in the save
dialog.
For example,
{dlgsave|Title|Default Name.txt|type=#Text Files!*.txt!Doc
Files!*.doc}.
The # following the
type= causes the default "All files" items to be added to the
drop-down - take out the # if you don't want this. Following
that are one or more pairs of strings, separated by exclamation marks
(!). The first string of each pair is the plain text string
shown in the drop-down, and the second string of each pair is the actual file
extension. You can also specify multiple extensions for the one type by
separating them with semicolons - for example, type=JPEG
Files!*.jpg;*.jpeg.
These codes also support
the modifiers listed under Codes for passing filenames. To use
these modifiers, you must also include the <title> and
<default> parameters (they can be left blank if
desired).
For
example {dlgopen|||noext} would strip the
extension from the selected filename.
This code supports the modifiers listed under Codes for passing paths. To use these
modifiers, you must also include the <title> and
<default> parameters (they can be left blank if desired). An
additional modifier, expand, is also supported. This causes the initially
selected folder to be automatically
expanded.
For
example {dlgfolder||C:\Program Files|expand} would
set C:\Program Files as the default folder and
automatically expand it in the displayed dialog.