Creating Actions Manually
There are two ways to create actions:
Using the Create Action desktop application
Manually creating an action definition
Creating an action manually requires you to edit a database file. This chapter describes how to manually create action definitions.
For an introduction to actions, see Chapter 10, Introduction to Actions and Data Types .
For information about using Create Action, see Chapter 11, Creating Actions and Data Types Using Create Action.
For reference information about action definitions, see the dtactionfile(4) man page.
Reasons You Must Create an Action Manually
There are three basic types of actions:
COMMAND
MAP
TT_MSG
The Create Action tool is designed to create certain types of COMMAND and MAP actions. All TT_MSG actions must be created manually.
For more information, see "Limitations of Create Action".
COMMAND Actions
A command action executes a command that starts an application or utility, runs a shell script, or executes an operating system command. The definition of the action includes the command to be executed (the EXEC_STRING).
The Create Action tool can be used to create the most common types of command actions. However, there may be some situations where you must create the action manually; for example, you must create a COMMAND action manually if the action specifies:
Multiple-file arguments with a different prompt for each argument.
Action invocation--the ability of actions to invoke other actions.
Argument-count dependent behavior--the ability to create an action that has very different behaviors for different numbers of file arguments.
A remote execution host--the ability to run an application on a system other than the one containing the action definition.
Change of user--the ability to run the action as a different user (for example, to prompt for the root password and then run as root).
MAP Actions
A map action is an action that is ``mapped'' to another action rather than directly specifying a command or ToolTalk message
Mapping provides the ability to specify alternative names for actions. For example, a built-in command action named IconEditor starts Icon Editor. The database also includes an Open action, restricted in the definition to bitmap and pixmap files (by the ARG_TYPE field), that is mapped to the IconEditor action. This lets the user start Icon Editor by selecting a bitmap or pixmap file in File Manager and then choosing Open from the Selected menu.
Create Action provides limited mapping for Open and Print actions. All other map actions must be created manually.
TT_MSG (ToolTalk Message) Actions
TT_MSG actions send a ToolTalk message. All TT_MSG actions must be created manually.