Animating an Object to Trigger a System Command
You can animate an object so that when it is selected, it causes a Windows system command to be executed. Common uses for this type of animation include:
- Configuring a Mimic object to execute a print command
- Configuring a Mimic object to run a program, such as Internet Explorer
(Although both of these can also be set up by using the Pick Action Wizard, see Creating a System Command Pick Action).
When animating an object to trigger a system command, you need to set the PickType to 16 (for System command). You also need to define the system command (or the location of a System Command database item) in the PickParam expression.
Example:
A Mimic object that is configured to run Internet Explorer when selected could have these animations:
- PickType—16
- PickParam—'C:\Program Files\Internet Explorer\iexplore.exe'
The same functionality could be provided by configuring a System Command item to have the Command: 'C:\Program Files\Internet Explorer\iexplore.exe'. Next, you would configure a Mimic object to use the following animations:
- PickType—16
- PickParam—"<location of System Command item>.cmd"
Where <location of System Command item> is a reference to the System Command item. The PickParam has to reference the System Command item’s cmd property.