Specifications
Mac OS X automatically adds an entry to its application database
when an application bundle is installed or copied to the system.
Thus on Mac OS X the function queries the system application
database with the specified key, which must be the filename of the
application bundle (that is, the same name one would use to address
the application from AppleScript) or the application’s bundle
identifier as provided in the property list located inside the
application bundle (example: “com.adobe.distiller”). In the latter
case, when multiple versions of the application are installed, Mac
OS X will choose the most recent version.
Searches the system folder in which applications are usually installed
for an application with one of the specified file names and returns
findApplicationOnDisk(
name1 : String, name2 :
String ) : String
the absolute path of the application if found or null if not. There
are two name arguments in case the application is named differently
on different operating systems. The second name argument can be
omitted if it is not needed.
On Windows the function recursively searches the contents of the
Program Files folder. If the specified name has no extension, “.exe”
is added.
On Mac OS X the function recursively searches the contents of the
Applications folder. If the specified name has no extension, the
function looks for the specified name AND for the name with “.app”
added. The function does not search inside application bundles.
This function may use substantial resources (and time) to complete
since it recursively searches the contents of a potentially large folder.
Therefore, when called from the findApplicationPath entry point
during Switch startup, this function is automatically disabled and
immediately returns an empty string without searching.
Returns the absolute path to the special folder indicated by the
folderID argument, which must be one of the strings listed in the
table below. Returns null if folderID is unknown.
getSpecialFolderPath(
folderID : String ) : String
Returns an absolute path tofolderID
The folder that serves as a common repository
for application-specific data for the current
ApplicationData
user (that is, the user who launched Switch
server)
The folder that serves as a common repository
for application-specific data that is used by
all users
CommonApplicationData
The resource folder associated with the calling
script; in the current implementation this is
PluginResources
always the folder that contains the calling
script package but implementations should
not count in this fact
454
Enfocus Switch 10










