Reference sections cover:
An alphabetical listing of all the fields.
See Also.
General syntax for action definitions |
 |
Field structure.
An action definition consists of a series of fields. The
definition begins with the mandatory ACTION field and ends with the
keyword END. Each field begins with a keyword and ends with a newline
character:
ACTION action_name
KEYWORD value
KEYWORD value
...
END
|
Spaces.
Extra spaces at the beginning or end of lines are ignored, so you can use
spaces to indent lines for easier reading.
Fields longer than one line.
The \ character at the end of a line indicates that the field continues
onto the next line.
Comments.
To comment a line, use the # character at the beginning of the line.
The # can be preceded by spaces. You cannot comment partial-lines.
Example.
The following lines define a COMMAND action named Xrdb_Merge_Nocpp.
Many fields are omitted because the default values are appropriate.
ACTION Xrdb_Merge_Nocpp
DESCRIPTION Merges a file into your resource database
WINDOW-TYPE NO-STDIO
EXEC-STRING xrdb -nocpp -merge %(File)Arg_1%
END
|
Example.
The next action, IslandPaintOpenDoc, includes fields for
custom action bitmaps. It starts Island Paint™ with a file argument.
ACTION IslandPaintOpenDoc
L-ICON Ipaint.l.bm
S-ICON Ipaint.s.bm
WINDOW-TYPE NO-STDIO
EXEC-HOST hpthere
EXEC-STRING /opt/IslandPaint/bin/IslandPaint %(File)Arg_1"File to open:"%
END
|
Example.
This next action definition creates a synonym action for Open_gif.
ACTION Open_gif_file
TYPE MAP Open_gif
END
|
Summary of Fields for COMMAND Actions |
 |
Required Fields.
- Field
Description (Default)
- ACTION
Begins the definition, contains the action name.
- END
Ends the definition.
- EXEC-STRING
Contains the command to be executed.
Icons.
- Field
Description (Default)
- DESCRIPTION
A description of the action, displayed when the user obtains item help on the action icon. (No help.)
- L-ICON, S-ICON
Absolute path of the large (L) and small (S) action icons in File Manager. (action.l and action.s.)
Optional Fields.
- Field
Description (Default)
- ARG-COUNT
The number of file arguments the action can have.
- ARG-TYPES
Filetypes for which the action is valid (*, 0, or >1).
- CWD
The current working directory.
- EXEC-HOST
The name of the host on which the application or command should be executed %DatabaseHost%, %LocalHost%,
%DataHost%, hostname, "prompt").
- TYPE
COMMAND.
- WINDOW-TYPE
The windowing support required to run the action
(PERM-TERMINAL, TERMINAL, or NO-STDIO).
Summary of Fields for MAP Actions |
 |
Required Fields.
- Field
Description (Default)
- ACTION
Begins the definition, contains the action name.
- END
Ends the definition.
Icons.
- Field
Description (Default)
- DESCRIPTION
A description of the action, displayed when the user obtains item help on the action icon. (No help.)
- L-ICON, S-ICON
Absolute path of the large (L) and small (S) action icons in File Manager.
ACTION field |
 |
Begins the definition and specifies the action name.
Required field for all actions.
The action name cannot contain spaces.
Example.
ARG-COUNT field |
 |
Specifies the number of arguments the action can accept.
Optional for COMMAND and MAP actions.
Defaults to * (zero or more arguments).
Allowable values:
- 0
Zero arguments.
- >1
More than one argument.
- *
Zero or more arguments.
Values of 0 and >1 have precedence over *.
Use the ARG-COUNT field to enrich an action with different drop and
double-click functionality. To do this, create two different actions
with different ARG-COUNT values and EXEC-STRINGs.
Do not use the ARG-COUNT field to specify that an action prompt you for a
file name when the action icon is double-clicked. This functionality is
provided automatically by using the EXEC-STRING syntax
%(File)Arg_n"prompt"% for file arguments.
Precedence of actions using ARG-COUNT. When two actions have the same name and different ARG-COUNT values, the one with the more specific ARG-COUNT (0 or >1) has precedence over
*.
Example.
See Also.
ARG-TYPES field |
 |
Specifies the filetypes that can be used as data.
Optional field for COMMAND or MAP actions.
Defaults to * (all filetypes).
This field consists of a list of filetypes for which the action is valid.
Items in the list are separated by commas. No spaces are allowed in the
list of filetypes.
If this field contains only *, the action is
valid for all filetypes.
You can create an action that behaves differently for different filetypes
by creating multiple action definitions, each of which specifies a
different filetype.
Precedence of actions using ARG-TYPES. When two actions have the same name and different ARG-TYPES values, the one with the more specific ARG-TYPE (not *) has precedence over
*.
Example.
See Also.
CWD field |
 |
Specifies the current working directory for the action.
Optional for COMMAND actions.
Cannot be used with MAP actions.
Uses the syntax:
[hostname:]/path/filename
|
If hostname is omitted, the database host (host containing the action) is used.
Defaults to /HomeDirectory/ when an action is invoked by double-clicking.
Default current working directory. If CWD is not set in the action definition:
When the action is invoked by dropping a file argument, the current-working directory is the directory containing the file.
When the action is invoked by dropping a directory argument, the argument becomes the current working directory.
If the action has no file arguments:
If it is started from a toolbox, the home directory is the current working directory.
If it is started elsewhere, the directory containing the action icon becomes the current working directory.
If the action starts a remote application, the home directory on the local system becomes the current working diretory if the directory is NFS-mounted onto the execution host. Otherwise, the home directory on the execution host becomes the current working directory.
Example.
DESCRIPTION Field |
 |
Provides item help for the action icon.
Defaults to NULL (nothing).
Can be used in COMMAND and MAP actions.
The field can contain any characters but newline (Return). Line breaks
are automatically inserted to wrap the text to fit in the item help box.
Extra spaces between words are ignored.
Example.
DESCRIPTION Converts an xwd or tiff graphics file to pcl format. Start \
the action by dropping a graphics file on it or by \
double-clicking the action icon.
|
EXEC-HOST field |
 |
Specifies the host where the command will be executed.
Optional for COMMAND actions.
Cannot be used for MAP actions.
Defaults to the host containing the action (%DatabaseHost%).
This field specifies which system in the network will execute the command.
- EXEC-HOST Value
Description
- %DatabaseHost%
The host where the action definition resides.
- %LocalHost%
The host where HP VUE is running.
- %DataHost%
The host containing the first file argument.
- hostname
The named host.
- %"prompt"%
Prompts the user for the host name each time the action is invoked.
Example.
See Also.
EXEC-STRING field |
 |
Contains the command executed by the action.
Required field for COMMAND actions.
Cannot be used in MAP action.
Syntax for arguments.
- Keyword
Meaning
- %(File)Arg_n%
Substitute the nth file argument. If the argument uses the syntax remote_hostname:/path/filename,
the argument is converted to the form /net/remote_hostname/path/filename.
- %Arg_n%
Substitute the nth file argument. Do not translate names from the form remote_hostname:/path/filename
to the form
/net/remote_hostname/path/filename.
- %(File)Arg_n"prompt"%
Substitute the nth file argument. If it is not found, prompt the user for a file name and substitute the response. If the argument uses the syntax remote_hostname:/path/filename,
the argument is converted to the form /net/remote_hostname/path/filename.
- %(File)"prompt"%
Prompt the user for a file name and substitute the response. If the argument uses the syntax remote_hostname:/path/filename,
the argument is converted to the form /net/remote_hostname/path/filename.
- %(File)Args%
Substitute all of the remaining arguments.
- %"prompt"%
Prompt the user and substitute the response. Do not use this syntax when prompting for a file name.
Syntax to a invoke shell.
- /usr/bin/sh -c
'string'
Invokes csh. The string can be the shell script or the filename of a shell script.
- /usr/bin/ksh -c
'string'
Invokes ksh. The string can be the shell script or the filename of a shell script.
See Also.
L-ICON and S-ICON fields for actions |
 |
Specify the icons for the action.
L-ICON: displayed in File Manager views By Name and Icon.
S-ICON: displayed in File Manager views By Name and Small Icon.
Default: action.l, action.s
The value for the L-ICON and S-ICON fields can be:
A filename. The system searches the icon search path. If the action or filetype is defined on a remote system, the remote system's search path is used.
Icon file names. There are no name requirements. You can use .bm or .pm extensions to distinguish between bitmaps and pixmaps.
Icon sizes.
Icons can be any size. These are the default sizes.
- Icon Type
Icon Size (Width×Height)
- L-ICON
32 × 32 pixels
- S-ICON
16 × 16 pixels
Example.
L-ICON frame.l.pm
S-ICON frame.s.pm
|
See Also.
The TYPE field |
 |
Describes whether the action contains a command or is mapped to another action.
Allowable values: COMMAND or MAP.
COMMAND type.
A COMMAND-type action is a command that will be executed. The action definition for a COMMAND action must include the execution string for the command (EXEC-STRING field).
Example.
ACTION Remote_PCL_Print
TYPE COMMAND
EXEC-HOST hpthere
EXEC-STRING /usr/bin/sh -c 'cat %(File)Arg_1"File to convert:"% | \
/usr/bin/X11/xwd2sb | \
/usr/bin/pcltrans -s -R -e%"magnification"% > \
%(File)"Destination:"%'
END
|
MAP type.
ACTION PRINT
ARGTYPES XWD
MAP PRINT_XWD
...
ACTION PRINT
ARGTYPES TIFF
MAP PRINT_TIFF
...
|
The WINDOW-TYPE Field |
 |
Specifies the windowing support required by the command.
Optional for COMMAND actions.
Cannot be used with MAP actions.
Defaults to PERM-TERMINAL.
- PERM-TERMINAL
The command must be executed in a permanent terminal emulation window (the window is not closed when the command terminates). Use with commands that take some input, produce some output, then terminate.
- TERMINAL
The command must be executed in a terminal window. The window is closed when the command is exited. Use with full-screen commands (for example, vi).
- NO-STDIO
No windowing support is required. Use with applications and X clients create their own windows, or with commands that produce no displayed output (for example, print commands).
Example.