Force copilot script run

I have a UR16E robot, I want to use script to send Force Copilot to insert an action program, and send it to the robot through port 30002 to control the robot’s work, how do I write a script program?