Product Logo

CNS Image

Import, edit, and export Images in the FileMaker environment

Functions

CNSImage_File_SelectWithDialog

NameCNSImage_File_SelectWithDialog
Description

The CNSImage_File_SelectFileWithDialog function allows you to use a dialog to locate a file on your hard drive and returns the path of the chosen file. You can specify the starting folder by specifying the optional “StartPath” parameter, and display a message in the dialog by using the optional “Prompt” parameter.

Return TypeText
FormatCNSImage_File_SelectWithDialog ( StartPath ; Prompt ; DialogType ; FileTypes )
Optional Parameters
StartPath

The path to the folder to display when the dialog first opens. For “PutFile” dialogs, you can also include a suggested file name.

Prompt

An optional prompt or message to display on the dialog.

DialogType

Specify “GetFile” to show an open file style dialog or “PutFile” to show a save as style dialog. [Default is “GetFile”.]

FileTypes

Specify a list of allowable file extensions for “GetFile” dialogs or a list of optional file extensions for “PutFile” dialogs. [Default is no file types.]

Examples
Example 1

Displays a file chooser dialog, and returns the path of the chosen file.

CNSImage_File_SelectWithDialog
Example 2

Displays a file chooser dialog starting at "images" directory on Windows.

CNSImage_File_SelectWithDialog( "c:\images" )
Example 3

Displays a file chooser dialog starting at "images" folder on Mac.

CNSImage_File_SelectWithDialog( "/Images/" )
Example 4

Displays a file chooser with the prompt "Choose a file...".

CNSImage_File_SelectWithDialog( "" ; "Choose a file..." )