# Using socket to send another script when the first script is over

**URL:** <https://forum.universal-robots.com/t/using-socket-to-send-another-script-when-the-first-script-is-over/17245>\
**Category:** URScript\
**Created:** [October 26, 2021, 5:42am UTC](https://forum.universal-robots.com/t/using-socket-to-send-another-script-when-the-first-script-is-over/17245 "2021-10-26T05:42:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pme0918087420](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/pme0918087420/32/2497_2.png) [@pme0918087420](https://forum.universal-robots.com/u/pme0918087420)\
**Post date:** [October 26, 2021, 5:42am UTC](https://forum.universal-robots.com/t/using-socket-to-send-another-script-when-the-first-script-is-over/17245/1 "2021-10-26T05:42:11Z")

</div>

hi all, I’m right now trying to do process control using computer socket connection with the robot. For example, I have two .urp or .script file that is generated by Robotmaster, Program1.urp and Program2.urp. I’d like to first send Program1.urp to the robot and **wait unit the program is finish** then send the second program, Program2.urp to the robot.

Can anyone tell me whether there is any existed code or function that can help me complete the process control?  
Thanks!
