getfiled
(getfiled dlglabel presetname
filetype options)
This function opens the FileSelection dialog
to select a file or folder.
Arguments
|
dlglabel string, label of the FileSelection dialog
presetname string, preset file or folder name, can be an empty
string
filetype string, requested file type, can be empty or
"*"
options integer, flags to control the particular behaviour
of the file / folder selection
|
Return
|
selected file or folder name
as string, or NIL if dialog was cancelled
|
Example
|
(getfiled "Select File
to View" "C:/MyData/" "ini;txt" (+ 4 16))
|
Remarks
|
options bits explained :
bit 0 = 1 : if set, asks to create a new
file/folder; if not set, asks to select an existing
file/folder
bit 2 = 4 :if set, allows to specify an
arbitrary file name extension
bit 3 = 8 :if set (and if bit 0 is not set,
meaning "select existing file"), the specified file is also
searched in SupportPaths
bit 4 = 16 :if set, the presetname is interpreted as a
folder name (must end with \\ or /), preset file name is then
empty
bit 5 = 32 :if set (and bit 0 is set, meaning
to "create a new file"), no overwrite warning message is shown for
an existing file
bit 6 = 64 : if set, an URL is accepted, but
no file is transferred
bit 7 = 128 : if set, URL specifications are
not allowed
|