84. selectFile

Parameter syntax:

[ 
  [ '[' dialog_box_title ']' ]?

  'openFile'|'saveFile'|'openDirectory'|'saveDirectory'|
  'openFileURL'|'saveFileURL'|'openDirectoryURL'|'saveDirectoryURL'

  [ URL_template ]? 

]?

This command is only useful to write interactive macro commands.

Displays a file chooser dialog box that may be used to select a file or directory, local or remote, existing or to be created, depending on the first keyword in the parameter. By default, this file selection mode is openFile which specifies a local, existing, file.

When parameter is openFile, saveFile, openDirectory or saveDirectory, the standard file chooser dialog box is displayed and the command returns a file or directory name.

When parameter is openFileURL, saveFileURL, openDirectoryURL or saveDirectoryURL, an ``advanced'' file chooser dialog box is displayed and the command returns a file or directory URL.

The optional URL_template parameter is used to specify the directory initially displayed by the file chooser dialog box. When saveXXX options are used, this parameter is used, not only to specify initial directory, but also to suggest a basename for the save file.

The optional dialog_box_title parameter may be used to specify a title for the dialog box. When this parameter is absent or empty, the dialog box will have a default title which depends on the specified action.

See also command selectConvertedFile, which has been designed to be used in Convert macro-commands such as docb.convertToHTML1, xhtml.convertToPS, etc.

Examples:

selectFile
selectFile [Save Configuration]saveFile
selectFile [Choose An Icon] openFileURL http://www.acme.com/doc/images/logo.gif
selectFile saveFileURL file:///tmp/article.pdf