Handling Files, Paths, Program Instances and Messages

Case Sensitivity and Slashes

 

The following commands are case sensitive. Use forward slashes to indicate pathes.

   

Parameter Notation Syntax

 

The notation used below for describing the parameters of individual commands is based on the Wirth Syntax Notation (WSN) :

  • Parameter names in curly brackets denote that you can specify no value, one value, or multiple values for this parameter in the command line.
  • Parameter names in square brackets denote optional parameters.
   

Command

Parameters

Description

Source

FilePath

Command for executing a TCL script out of a file. Use forward slashes for specifying the path. The command works like the TCL command source, but automatically replaces the following place holders (like command MakeDirectoryPath):

%UserDir%: User data directory for the current user (for example, c:/Users/Smith)

%AppDataDir%: Directory for application data of VisualApplets

%VaInstallDir%: Installation directory of VisualApplets

%UserLibDir%: Directory for user libraries.

%CustomLibDir%: Directory for custom libraries.

%VaVersion%: VisualApplets program version, for example, “3.1“

%CurrDateTime%: Current date and time according to ISO 8601 (basic format), for example “20170530T134522”

%DateTime%: Date and time at start of VisualApplets according to ISO 8601 (basic format), for example “20170530T134350”

MakeDirectoryPath

 

FullPath

 

Command for creating pathes (and their directories) of any desired depth.

The command automatically replaces the following place holders:

%UserDir%: User data directory for the current user (for example, c:/Users/Smith)

%AppDataDir%: Directory for application data of VisualApplets

%VaInstallDir%: Installation directory of VisualApplets

%UserLibDir%: Directory for user libraries

%CustomLibDir%: Directory for custom libraries

%VaVersion%: VisualApplets program version, for example, “3.1“

%CurrDateTime%: Current date and time according to ISO 8601 (basic format), for example “20170530T134522”

%DateTime%: Date and time at start of VisualApplets according to ISO 8601 (basic format), for example “20170530T134350”

If the command has been carried out successfully, the absolute path is returned.

GetAbsolutePath

 

Path

 

Returns the absolute path of the path you specify in parameter Path.

The command automatically replaces the same alias names (place holders) as command MakeDirectoryPath.

You are allowed to refer in Path to a directory or a file that doesn’t exist, so that the resulting path name refers to a directory or a file that doesn’t exist.

Wait

 

TimeInMilliseconds

 

Command for waiting the specified time TimeInMilliseconds. The VisualApplets GUI stays active during waiting time.

If you set TimeInMilliseconds to 0, at least one event loop update of the GUI is carried out by VisualApplets. You can use this for making sure that the GUI displayes the results from earlier commands.

Message

 

Type

Code

Text

Command for emitting

  • an error message (Type=error),
  • a warning (Type=warning), or
  • an informative message (Type=info)

In Code, define the message code for your message. Code has the value range from -999 to +999. Use only values in this range to avoid conflicts with the current and/or future versions of VisualAppets.

Use Text to enter the message. The message is completed by a dot automatically.

Exit [Mode]

Command for terminating the current VisualApplets session. You can use Exit even if you still have a design open. However, don’t forget to save your changes before.

If you still have a desing open and the design contains unsaved changes:

  • If you set the optional parameter Mode to Discard, the open design will be closed even if it containes changes that you didn’t save yet. The unsaved changes will be discarded.
  • If you use Exit without using parameter Mode although the open design containes unsaved changes, the command will be terminated and you receive an according error message.