Onetastic Macro Documentation >
>
>
FileSystem_ShowOpenFileDialog FileSystem_ShowOpenFileDialog
Displays a file picker to allow user to pick one or more files from local computer.
Syntax
Array<File> FileSystem_ShowOpenFileDialog(
Bool multiple,
Array<String> allowedTypes)
Parameters
- Bool multiple
- If true, the file picker will allow user to pick multiple files. If false, user can only pick a single file.
- Array<String> allowedTypes (optional)
- An array of allowed file types. Each entry in the array contains a semicolon separated file type filters. Corresponding keys for each value is a description of the file type. If not provided, all files will be allowed in the picker.
Examples
$files = FileSystem_ShowOpenFileDialog(false)
$files = FileSystem_ShowOpenFileDialog(true)
$types["Text Files"] = "*.txt"
$types["Image Files"] = "*.jpg;*.png;*.gif"
$files = FileSystem_ShowOpenFileDialog(false, $types)
if (Array_Length($files) > 0)
|