Carapace

Shortcut Class

A Windows shortcut is a link to another object - typically a file. By clicking on the shortcut, the indicated (command) file is started and given the configured arguments etc.

The Shortcut object enables you to create shortcuts on the user's desktop etc.

Shortcut Creation

The create function can be used to create a Shortcut object eg.

    (create Shortcut)
Once created, this object is tailored using its properties and methods.

Shortcut Properties

A Shortcut object supports the following properties:

property name property type description
command String the absolute path name of the command to run
description String a description for the shortcut
arguments String any arguments for the command
workingDirectory String the working directory for the command to use when it runs

Currently, these properties are writable but not readable.

Shortcut Methods

The Shortcut object supports the following methods:

method name description
icon set the location and index for the icon
save save the shortcut to a place on disk


icon

Set the location and index for the icon. The location should be an absolute path.

Arguments:

pathString
index (optional) String

Return type: the empty List ()


save

Save the shortcut to a place on disk. Note that the extension for the shortcut name should be .lnk if Windows is to understand it properly.

Arguments:

pathString

Return type: the empty List ()


Contents Index Current topic: objects Related topics: functions