DADiSP Worksheet Functions > Function Categories > Menu Functions > PICKFILE
Uses a native GUI system dialog box for selecting a file.
|
"folder", "title", "filter", mode) |
"folder" |
- |
Optional. The directory (folder) where the file to be selected is located. Defaults to the working directory. |
||||||
"title" |
- |
Optional. A string, the text to be placed on the title bar. Defaults to "File Name". |
||||||
"filter" |
- |
Optional. A string. Display files that conform to the given wildcard pattern. Defaults to *, all files. |
||||||
mode |
- |
Optional. An integer specifying the list display mode:
|
A string representing the selected path and filename or directory.
Under Windows:
pickfile(gethome+"macros", "Pick a Macro", strescape("Macro Files(*.mac)\0*.mac\0\All Files(*.*)\0*.*\0\0"))
brings up a dialog box that has "Pick a Macro" on the title bar, prompts for "Macro Files" and only list files given in the given directory that end in the .mac extension.
Although the filter specification is flexible, the \0 character must terminate each prompt sub-string and file filter sub-string. A \0 character must also terminate the entire filter specification string.