![]() |
PFTrack Documentation | Command Line Usage |
Please note: command line control of PFTrack is only available to Enterprise customers.
PFTrack has the ability to execute commands sent to it from an external process, basically allowing you to remotely control the application.
To enable this feature PFTrack needs to be started with the command line argument:
-command_port PORT_NUMBER
to enable it for remote control operation and to listen for incoming commands on the port number specified.
Only one external process can connect to PFTrack on this port at any one time and the connection maybe refused if PFTrack is busy (typically when the application is processing rather than sitting idle).
Command are sent to PFTrack as a plain text string in the form of command line arguments separated with space-triple-dash-space, e.g.
-new_project --- /path/to/wherever --- -close_project ---
This scheme reduces any ambiguity is separating each command and allows for command parameters with dashes in. N.B. a trailing " --- " is needed to terminate the command set.
PFTrack will process these commands and transmit back the terminal output they generate.
Any number of individual commands can be concatenated into a single command set to be sent to the application in one go. However, the application will only process one set of commands at a time and will close the connection when the set of commands has been processed. You need to open a new connection to send additional commands.
A simple Python script is supplied in the remote
sub-directory of where the application is installed which acts as a basic remote control client to PFTrack. The Python script connects to PFTrack, send a set of commands to it, and prints the received reply. The commands and their parameters are read from the command line (the script takes care of the space-triple-dash-space issue). See the comments in that script for more information.
Alternatively you can use a second instance of PFTrack, started with the -remote
command, to remotely control an already running instance. Start the second instance using something like:
-remote -command_port PORT_NUMBER -command1 -command2
to make the first instance run command1
and command2
.