File dialogsReference
savefiledialog
Ask the user to choose a destination filename.
Details#
Ask the user to choose a destination filename. The selected full path; nil on cancellation or dialog failure.
Signature#
savefiledialog(filter: string?, title: string?): string?Parameters#
| Parameter | Type | Description |
|---|---|---|
filteroptional | string | NUL-separated Windows label/pattern pairs; default All Files / *.*. Example: Text files\0*.txt\0. The implementation adds the final double NUL. |
titleoptional | string | Dialog title; default Save File. |
Returns#
The selected full path; nil on cancellation or dialog failure.
Examples#
Local example
local path = savefiledialog("Text files\0*.txt\0", "Local note")
if path then print(path) end