Initiates a Save File Dialog.
FileSaveDialog ( "title", "init dir", "filter" [, options [, "default name"]] )
Parameters
title | Title text of the Dialog GUI. |
init dir | Initial directory selected in the GUI file tree. |
filter | File type filter such as "All (*.*)" or "Text files (*.txt)" |
options | [optional] 1 = File Must Exist (if user types a filename) 2 = Path Must Exist (if user types a path) 4 = Allow MultiSelect 8 = Prompt to Create New File (if does not exist) 16 = Prompt to OverWrite File |
default name | [optional] File name to suggest to the user to save the file with. |
Return Value
Success: | Returns the full path of the file chosen. Results for multiple selections are "Directory|file1|file2|..." |
Failure: | Sets @error to 1. |
Remarks
Separate the file filters with a semicolon as shown in the example.
Related
FileOpenDialog, FileSelectFolder
Example
$MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"
$var = FileSaveDialog( "Choose a name.", $MyDocsFolder, "Scripts (*.aut;*.au3)", 3)
; option 3 = dialog remains until valid path/file selected
If @error Then
MsgBox(4096,"","Save cancelled.")
Else
MsgBox(4096,"","You chose " & $var)
EndIf