Creating a Script File [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
Creating a Script File
It will help you to understand script files if you see an example of a
very simple one. Scripts can be created in your Work Area (or in an MPE
text file or other editor). The easiest way to try out a script is to
use the SCRIPT command to execute it. For this to work, the script must
be in your Work Area. Therefore, for example, if you build your script
in an MPE file, you must copy it into your Work Area.
To create a script in your Work Area, you create a text item in the
normal way and then type the script commands you want to include in
it--it is just like creating any other text item.
Suppose you want to send an item from your Work Area called "Weekly
Status Report" to Mary Smith on mailnode ACCTS/01 using a script. You
want to set a read acknowledgement on the message and make it urgent.
The sequence you would go through to create the script is shown below:
Workarea > Create Text
Subject: Status Update
SEND "Weekly Status Report" to Mary Smith /ACCTS/01
ACKNOWLEDGE 4
URGENT
MAIL
&EXIT
Save the text in your Work Area. As you can see, all you do is enter the
HP Desk commands you would normally use into the script file, followed by
the &EXIT command. &EXIT is a directive used to indicate that you want
to end the script file at that point.
You can now execute this script from your Work Area by typing:
SCRIPT "Status Update"
HP Desk searches your Work Area for an item with the given subject, and
when it is found, the script will be executed.
When you are satisfied with the development of a script, you should
INSTALL it to avoid having to use the SCRIPT command every time you
execute it (providing that you have sufficient capabilities, of course).
Once you know how to write a simple script it is easy to build more
complicated ones, as the following sections indicate.
MPE/iX 5.0 Documentation