# Steps to execute URScript within the ProgramNode

**URL:** <https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202>\
**Category:** Java\
**Created:** [September 22, 2017, 11:56am UTC](https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202 "2017-09-22T11:56:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon4621714](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@anon4621714](https://forum.universal-robots.com/u/anon4621714)\
**Post date:** [September 22, 2017, 11:56am UTC](https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202/1 "2017-09-22T11:56:04Z")

</div>

Hallo everyone ,

I’m trying to program a URCap button that allows me to move my robot directly for a position after pressing on it without going through a Tree program.

so if I had good understood : I must do as below :

1. send my program to a socket the secondary for example (open the socket) and check if it works well
2. create a Stream for Data
3. Send my URScript(create Script)
4. close the Socket

thank you in advance

can anyone help me to understand the operation better?

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [September 22, 2017, 1:22pm UTC](https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202/2 "2017-09-22T13:22:34Z")

</div>

Hi there, @anon4621714

I have just made a [new sample](http://forum.universal-robots.com/t/sample-send-script-with-button-push-urcap/1203) here, that I reckon is just what you are asking.

---

<div class="post-metadata">

**Author:** ![anon4621714](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@anon4621714](https://forum.universal-robots.com/u/anon4621714)\
**Post date:** [September 22, 2017, 7:53pm UTC](https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202/3 "2017-09-22T19:53:14Z")

</div>

thank you very much this would be so helpful

---

<div class="post-metadata">

**Author:** ![anon4621714](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@anon4621714](https://forum.universal-robots.com/u/anon4621714)\
**Post date:** [October 19, 2017, 6:52am UTC](https://forum.universal-robots.com/t/steps-to-execute-urscript-within-the-programnode/1202/4 "2017-10-19T06:52:55Z")

</div>

Hello,  
I HAVE ONE OTHER QUESTION !!  
is it possible to run the URScript directly without going through the program node?  
what I mean if it is Possible when I press on my Button (the URCap that I had already created) to get the desired move without gointg through a node(I press on my URCap then the Robot moves to the desired position)

thank you in advance
