openfiledialog
Shows an open-file dialog.
Syntax
openfiledialog(filter?: string, title?: string) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
filter? | string | The filter value used by the call. |
title? | string | The title value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
openfiledialog is part of the Dialogs library. Dialog helpers call native Windows pickers. The call blocks until the user chooses a path or cancels.
The operation is performed immediately using the arguments supplied at the call site.
Example
local file = openfiledialog("Text files (*.txt)|*.txt|All files (*.*)|*.*", "Choose a file")
print(file)
Notes
- The dialog blocks until the user selects a path or cancels.