CRI Atom Craft allows you to use the Robot function from an external executed Script (by an external process).
The TCP/IP protocol is used to communicate with external execution scripts during remote execution.
To execute the Script Server remotely, select "Server" > "Start Script Server" from the "Script" menu to start the Server for remote execution of the Robot function.
The server settings (IP address, port number) can be set from "Script Settings" in the "Script" menu.
After starting the server, connect with a script from an external client.
Scripts created for Local execution of Python script can also be run from the console version of CRI Atom Craft .
For the console version of CRI Atom Craft , see Building Projects with the CRI Atom Craft command line version .
(1) Start CriAtomCraftC.exe with the option -runrobotserver
. You can also specify the IP address and port number.
(2) The console tool will wait for the script.
(3) While the script is waiting, enter -serverexit
and press Enter to exit the console tool.
While the script is waiting, only the commands below are accepted. Options specified for the executable file cannot be used.
Command | Description |
---|---|
-serverexit | Terminates the server's communication waiting process and terminates the application. |
-serverreboot | Restarts the server process. Use this if the remote API cannot be processed correctly for some reason. |
The Script uses the modules in the remote execution plugin package.
In this package, cri.atomcraft.criatomcraft_api_lib is provided.
By importing the Connection Module , you can initialize the function and connect with CRI Atom Craft to run the remote execution.
※ For the settings of this remote execution plugin package, refer to Preference settings for remote execution .
For example, if the script of the Display "Hello, World" in the Script log tutorial is made compatible with remote execution, it will be as follows:
Save this Script as " helloworld.py ", and run the following command from Terminal(command prompt), you can check the output character string in CRI Atom Craft.
※ The Python3 executable files may be shown as "python" instead of "python3" in some environments.