 |
» |
|
|
 |
Create Action creates an action for an application and adds the action to
your Personal toolbox.
The Create Action utility is located:
HP VUE sessions: Initially, it is placed in your Personal Toolbox. There
is another copy in the Utilities subdirectory of the the General Toolbox.
HP VUE Lite sessions: The Tools subpanel.
See Also.
What Create Action does |  |
Use Create Action to define new actions. HP VUE uses actions to provide
icons representing applications or other utility
programs and scripts.
Create Action automatically does these things:
Displays the Create Action dialog that lets you create the definition for the action. When you are done filling in the dialog, Create Action
creates a file containing your new action definition.
Rereads the database so that the action takes effect immediately (regular
HP VUE sessions only).
Creates an icon for the action in your Personal Toolbox (regular HP VUE
sessions only). You can double-click the icon to start your application.
Create Action is useful for creating new actions. It cannot be used
to edit existing actions.
See Also.
To use the Create Action utility |  |
Start Create Action.
Double-click CreateAction in your Personal Toolbox, or in the Utilities
subdirectory of the General Toolbox.
Supply the required information. In the Name field, type a unique name for the action. The name can't
include spaces. Try to keep the name under 11 characters long so that
the action will work on systems that do not support long file names.
In the Command Line field, type the command that starts the application. Type the command exactly the way you would type it in a command line,
except that, where you would type a file name, substitute $n,
where n is an integer. Here are some sample command lines:
emacs
bitmap $1
diff $1 $2
lp -oraw $1
|
The command lines are not passed to a shell unless you explicitly
specify the use of a shell. These lines use shell processing:
/usr/bin/sh -c 'ps | lp'
/usr/bin/sh -c 'spell $1 | more'
|
Use the Window Type options menu to select how the action's output will
be displayed:
- X Windows
The application creates it's own window.
- No Output
The command has no display output.
- Terminal
HP VUE will run the application in a new Terminal Emulator window. The window will remain open until you explicitly close it.
- Terminal (auto-close)
HP VUE runs the application in a new Terminal Emulator window that closes automatically when you exit the application.
If you don't know which option to select, leave it set to the default
(Terminal).
Supply a prompt for data. If the command takes a data file (the Command Line contains $1), type
the text of the prompt into the Filename Prompt field. This is the text
that will be displayed when the action displays a dialog box requiring
you to enter a file name. Leave this field empty if the command does not
take a data file.
Supply optional information. If you have special icons for the action, type the filenames in the Large
Icon and Small Icon Fields. (You will have to supply the full path if the icon file is not located in a directory on the icon search path.) These are the icons that will be used for the action is the toolbox.
In the Description field, type the item (F1) help for the action
icon. You can use Enter to wrap text to the next line in the text
box.
Store the action. Choose Apply. A dialog box appears telling you the name of the database
file created for the new action, and the system is busy momentarily as
the database is reread. Do not close the Create Action window yet.
Open your Personal Toolbox. You should see an action icon for your new
action.
Test the action. Double-click the icon. If the action accepts file data, you can also
drop a data file onto it.
If necessary, edit the fields in Create Action and reApply the changes.
As long as the Create Action window is open, you can edit the action,
apply the changes, and test the modified action. Once Create Action is
closed, you cannot use it to edit the action—
you must manually edit the file created by Create Action for the action
definition.
When the action behaves properly, choose Close in the Create Action
dialog.
See Also.
To use an action created with Create Action |  |
Regular HP VUE sessions.
To run an action that doesn't require file data, double-click the action
icon.
To run an action that requires file data:
Drop a data file on the action to run the application with that file.
Or, if you included a Filename Prompt when you defined the action,
you can double-click the action icon to prompt for the file name. Supply
the absolute path to the file, or a path relative to your home directory.
HP VUE Lite sessions.
See Also.
Limitations of Create Action |  |
You cannot use Create Action to define an action if:
The action is to be limited to a particular filetype.
The action requires a non-file parameter. For example, you cannot use
Create Action to write an action for the command:
where the user has to supply device each time the command is
executed. (You can manually create an action that does this.)
The action uses complex shell syntax. Instead, you can:
Write a shell script, and use Create Action to write an action that starts the script.
Create the action manually by editing a database file.
The action is a MAP-type action.
You can use Create Action to write actions that run applications on remote
systems by using remsh in the Command Line. However, actions using
remsh will not take advantage of the automatic xhosting mechanism provided
by actions written manually (see “To configure the local host for remote execution”).
See Also.
To make a general action with Create Action |  |
Create the action using the Create Action utility. When you apply the
action, make note of the file to which the definition is saved.
Log in as root.
Copy the definition file to /etc/vue/config/types.
Create an action icon in the General Toolbox:
Copy the action icon (Ctrl+drag) from the Personal Toolbox to the
General Toolbox.
Or, create a new file in /usr/vue/config/types/tools with the
same name as the action name. Make the file executable.
Example: Creating an action for an application |  |
You want to create an action to start the Island Draw™ application
on your system and simutaneously open a data file in the application.
The command line for this is:
Start Create Action.
Open the Utilities subdirectory of the General Toolbox.
Double-click CreateAction to display the Create Action dialog box.
Define the action. Fill out these required fields:
Name: IslandDraw
Command Line: IslandDraw $1
|
Select X Windows from the Window Type options menu.
Supply a prompt for the data file:
Filename Prompt: IslandDraw data file:
|
Create and test the action. Choose Apply. When the new action has been written to the database, a
message is displayed telling you the name of the file containing the new
definition.
Open the Personal Toolbox.
Doubleclick IslandDraw to display a prompt for a data file. Supply a
data file and choose OK.
When you are satisfied that IslandDraw is working properly, choose Close
in the Create Action dialog.
See Also.
|