Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Accessing the file system

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: February 02, 2025
Also available as a single HTML file

Onetastic Macro Documentation > Functions > File System Functions > FileSystem_ShowSaveFileDialog

FileSystem_ShowSaveFileDialog

Displays a file picker for user to provide a location and file name to save to on the local computer. User can pick an existing file or provide a new file name.

Syntax

Array<File> FileSystem_ShowSaveFileDialog(
	String suggestedName, 
	Array<String> allowedTypes)

Parameters

String suggestedName
The default name for the file to save. Can be left empty.
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

// Show the file picker to get a file name and location from user, suggest "contacts.txt" as the default name $file = FileSystem_ShowSaveFileDialog("contacts.txt") // Allow only text files to be picked $types["Text Files"] = "*.txt" $file = FileSystem_ShowSaveFileDialog("contacts.txt", $types) if (IsObject($file)) // Do something with the file user picked else // User cancelled

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

File System Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions