Previous Up Next

7  Acting

It is possible to define new actions for making external applications available from a context. These applications need to receive some parameters that are specific to each object. So, source (resp. well) modules now produce these parameters, called action arguments, for each object (resp. for each well). The action arguments of an object are accessible from the contextual menu of the extent window. An action argument is made of three parts: An object can be given any number of parameters, and several parameters can have the same mime so as to specify different values for a type of parameters.

New actions can be defined through the command Actions > Add action.... An action is defined by 3 things: Both the name and the command can contain mimes as variables, which select relevant parameters for the action. For instance a audio player will use a mime variable audio for instance. A mime can be made more precise like in audio/mp3. Mimes must be parenthesized and prefixed by the character '$' for locating and replacing them by parameter roles in the action name, and parameter values in the action command.

Every mime variable occuring in the name should also occur in the command. The mime of an object parameter can be an extension of a mime variable: e.g., $(audio) matches audio/mp3. An action can be instantiated several times for a same object if several roles/values are available for the mime variable. Finally on Windows/Cygwin, if an action uses a Windows application, then any file path must be converted. This conversion is simply specified by adding :win after a mime variable, like in $(image/jpeg:win).

The list of all actions can be displayed by the command Actions > List actions..., and offers the following commands as buttons: When selecting a set of objects (by default, the full extent), the contextual menu of the extent window contains all possible instanciations of actions according to the action arguments of the selected objects. Selecting an action executes the associated command. When a same action name applies to several objects, the number of these objects appears between parentheses. This means the action will be exexuted many times, and requires confirmation from the user (as this may be dangerous to launch many times an application). If an export as a well is possible, actions are also given according to the action arguments of the would-be well. If such an action is selected, then the well is produced in a temporary file, and the action command is executed on this file.


Previous Up Next