FILEOPEN Mnemonic - Create File Open Dialog

Syntax

'FILEOPEN'(prompt,path,name,ext[,filters])

Description

For BBj-specific information, see FILEOPEN Mnemonic - Create File Open Dialog - BBj.

The 'FILEOPEN' mnemonic activates the standard File Open dialog.

Parameter

Description

prompt

Text to display in the title bar of the dialog.

path

Default directory for the file to be opened in the dialog.

name

Default name for the file to be opened in the dialog. Use the empty string ("") to avoid setting a default filename.

ext

Default extension (usually three characters, do not include the dot) for the file to be opened in the dialog. Use the empty string ("") to avoid setting a default extension.

filters

One or more filters in the following format:

"text description" + $0a$ + "mask" [+$0a$ + "text description" + $0a$ + "mask" …]

The mask specifies an extension, in the format "*.ext" or "*.*"; two or more masks are separated with semicolons. The filter, if included, indicates which files will appear in the list. For example:

print 'fileopen'("Open Resource File",resource_dir$,"","","Binary Resource Files"+$0a$+"*.brc;*.brf"+$0a$+"ASCII Resource Files"+$0a$+"*.arc"+$0a$+"All Files (*.*)"+$0a$+"*.*")

When the dialog is dismissed, a line of text, terminated with $0A$, is injected into the SYSWINDOW stream. The next READ on the channel will receive the text and will be "::BAD::" (error encountered), "::CANCEL::" (user clicked Cancel), or the fully qualified path of the selected file. This dialog does not actually cause any files to be opened; it only returns the name the user has selected.

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing