Xbasic

A5_defineAliases Function

Syntax

A5_defineAliases(aliases)

Arguments

aliases

The aliase to define

Description

Allows you to define aliases for use in a Desktop application using Xbasic. Aliases in a Desktop application are normally defined using the View/Settings/Aliases dialog. This function allows you to define the aliases programmatically.

Discussion

Takes a CRLF delimited list of aliases defined using this format: aliasname|path. Allows you to define aliases for use in a Desktop application using Xbasic. Aliases in a Desktop application are normally defined using the View/Settings/Aliases dialog. This function allows you to define the aliases programmatically.

Example

The following script (which would typically be placed in the Autoexec) will define two new aliases:

dim myaliases as c 
myaliases = <<%txt%
[server]|\\masterserver\images
[server2]|\\slaveserver\images2
%txt%
a5_defineAliases(myaliases)

Having defined the aliases, you can now use them, as shown below in the Interactive window:

?filename_decode("[server]\image1.jpg")
= "\\masterserver\images\image1.jpg"

Last Modification: Friday 27 of April, 2012 16:16:16 UTC by mheller.