61. selectFile

Parameter syntax:

[ '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.

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

Examples:

selectFile
selectFile saveFile
selectFile openFileURL http://www.acme.com/doc/images/logo.gif
selectFile saveFileURL file:///tmp/article.pdf