Replacing HP Desk Commands With Your Own [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
Replacing HP Desk Commands With Your Own
If a script or an abbreviation is installed with the same name as an HP
Desk command, for example READ, then it will override the HP Desk
command. This can be used to take away particular capabilities from
particular users.
This following script shows how simple it is to replace HP Desk commands
with your own versions. In this case we want to limit use of the PROFILE
command to only those user who are members of a capability group called
"PROFILERS".
&COMMENT PROFILE - Only members of the group PROFILERS
&COMMENT are allowed to alter their profile.
&FORWARD okuser <MEMBER "PROFILERS">
&PRINT
&PRINT Sorry, you are not allowed to use the PROFILE command.
&EXIT
$okuser
*PROFILE
&EXIT
Firstly the script file checks if the user is a member of the "PROFILERS"
user capability group using the <MEMBER> function. If the user is a
member of the group then the script jumps forward to a label called
$okuser. If the user is not a member, the script will exit.
The script allows the group members to actually execute the real PROFILE
command. This is done by preceding the command with an asterisk
character (*). If this character is not included, there will be a
recursive call to the script.
Using this technique you can limit or enhance existing HP Desk commands
to operate the way you want. For example, you may use an editor that is
not supported directly by HP Desk. You could enhance the EDIT command to
check the type of item to be edited and if necessary, invoke your editor
to deal with it.
When you modify existing HP Desk commands in this way or create new
commands, it is recommended that you issue informative messages and
prompts in the same style that HP Desk uses.
MPE/iX 5.0 Documentation