This chapter explains how to execute Commands and Script Files with Phoranso's Scripting Interface.


Phoranso provides a powerful scripting interface that enables users to execute commands directly from a Windows Command Prompt or through scripting languages such as Python, among others. This scripting capability empowers users to automate tasks and streamline workflows with ease.


Executing Commands individually



A Phoranso command typically mirrors the interactive functionality available in the regular Phoranso user interface. For instance, the Photometry command corresponds to the Photometry operation found in the Photometry menu.

Users can execute Phoranso commands individually from a command line interface. This method is suitable for executing single commands quickly without the need to create a script file. To execute a command individually:


  • Open the Windows Command Prompt or the scripting environment of your choice.



  • Type the desired Phoranso command (examples will be provided later in this chapter) and press Enter to execute it. In the following image, we entered Phoranso Version to execute the Version command, which returned the value 0.1.0.1 (this version was in beta at the time).




Running Script files



Alternatively, users can group multiple commands into a script file for seamless execution. A script file is a plain text document containing a series of commands that are executed sequentially. Each line within the script file represents a command. To run a script file with Phoranso, follow these steps:


  1. Prepare the Script file: Create a plain text document and save it with a file extension appropriate for the scripting language being used (e.g., .bat for Windows batch scripts, .py for Python scripts).

  2. Write Script Commands: Populate the script file with the desired Phoranso commands, each on a separate line.  

  3. Open the Command Prompt: To run the script file, enter the command to execute the script followed by the path to the script file. For example, in the Command Prompt, you would type MyScript.bat to execute a batch script named MyScript.bat, located in the folder indicated by the Command Prompt.

By leveraging Phoranso's scripting interface, users can efficiently automate repetitive tasks and integrate Phoranso functionality seamlessly into their workflows, enhancing productivity and flexibility.


This chapter provides an overview of all supported scripting commands, complemented by several examples.