SELECTFILE$ opens the Windows file dialogue and returns the file selected

Syntax

SELECTFILE$(DialogueTitle$, Dir$, Filter$)

Arguments

  • DialogueTitle$ contains a string with the title or "Caption" of the file dialogue
  • Dir$ contains the first path where to look for files, e.g.: "\\Ma013srv\Data" or "C:\Program Files\Quaestor\Data". "NullString" can be provided if the file should be selected in the current Report directory (see Directory structure
  • Filter$ contains the file filter set for the dialogue, e.g.: 

    "Telitab Files (*.qdb)|*.qdb|External Process Output Files (*.epo)|*.epo" or "MMS data Files (*.mms)|*.mms"

Remarks

  1. If the dialogue is closed by "Cancel", "NullString" is returned by SELECTFILE$
  2. The file dialogue can also be invoked to assign a value to a string variable using the following meta command (attribute) in the data slot of the parameter:

@FILEDIALOGUE 
DialogueTitle$ 
Dir$ 
Filter$

Examples

Selection from a list of different types

SELECTFILE$("Open the relevant TeLiTab file or program output...", "C:\Data\", "Telitab Files (*.qdb)|*.qdb|External Process Output Files (*.epo)|*.epo|All Files (*.*)|*.*")

returns a file dialogue with the filters:

  • Telitab Files (*.qdb)
  • External Process Output Files (*.epo)
  • All Files (*.*) 

Selection from groeps of file types

SELECTFILE$("Open the relevant picture...", "C:\Data\", "Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*")

returns a file dialogue with the filters:

  • Image Files(*.BMP;*.JPG;*.GIF)
  • All Files (*.*)

 

 


 

 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview


  • No labels