Product Logo

SMTPit Pro

A Feature-rich Email plug-in

Functions

SMTPit_File_SelectWithDialog

NameSMTPit_File_SelectWithDialog
Description

This function will display a file chooser dialog. You can set the location to open the dialog to, as well as display a custom prompt message.

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

The Path to the Folder to display when the dialog first opens.

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.

SMTPit_File_SelectFileWithDialog
Example 2

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

SMTPit_File_SelectFileWithDialog( "c:\images" )
Example 3

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

SMTPit_File_SelectFileWithDialog( "/Images/" )
Example 4

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

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