Use the Execute shell command action
to run a shell command after a specified event occurs. The Execute
shell command event action allows you to run a shell command
like that performed using the operating system Run command from the
Start menu.
About this task
For example, you can run a shell command to open Notepad
or an email program.To add an Execute shell command event
action to an object:
Procedure
- Select the object in the editor window and double-click
the event that you want to trigger the jump from the Events view.
The [objectname] Behavior window
opens.
- Click the Add New Action icon.
The Add New Action window opens.
- Select Execute shell command in
the actions tree.
Note: To quickly find the required event
action, type the name of the action in the filter text field.
- Click Next.
The Execute
shell command action parameters page opens.
- Type the command in the Command box
or click Browse to browse and select a file
that contains the commands.
Note: You can use expressions
to specify commands. For example, type ="%SystemRoot%\notepad.exe
" + Var1
to open a file, the path to which is stored in the Var1
parameter,
in Notepad.
- Click Finish. The Execute
shell command action is added. The Add New Action window
closes.
- From the [objectname] Behavior window,
click the Apply button to apply all actions
that have been added for the event.
- Click OK to close the [objectname]
Behavior window.