Skip to main content

Configuring event actions

Write a pxpython.py script file, using the Python scripting language, to configure event actions triggered by the pxpython program. Modify the sample script included in the samples directory, and copy it to the \<instance>\script\ directory. If you cannot find the sample file, try re-running setup to modify your installation. Sample files are automatically installed with complete (typical) installations. You can select them in custom installations.

When you configure an event, you enter the program name or the target ID you set up earlier.

In both cases, the program looks for the default script with the matching name.

You can write an alternative configuration file; for example when you have multiple targets of the same type. When you configure an event, you specify the file using the -cfg parameter; for example:

  • pxpython.exe -cfg myfile.py

    or

  • MYPYTHON -cfg myfile.py