# How can I run a script outside the generateScript method?

**URL:** <https://forum.universal-robots.com/t/how-can-i-run-a-script-outside-the-generatescript-method/8018>\
**Category:** URScript\
**Created:** [July 3, 2020, 5:07pm UTC](https://forum.universal-robots.com/t/how-can-i-run-a-script-outside-the-generatescript-method/8018 "2020-07-03T17:07:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mmi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mmi/32/691_2.png) [@mmi](https://forum.universal-robots.com/u/mmi)\
**Post date:** [July 6, 2020, 7:12am UTC](https://forum.universal-robots.com/t/how-can-i-run-a-script-outside-the-generatescript-method/8018/2 "2020-07-06T07:12:04Z")

</div>

Take a look at this example:

> [@URCap Sample: Send Script with button push URCap](https://forum.universal-robots.com/t/sample-send-script-with-button-push-urcap/1203):
>
> sendScriptWithButton URCap Description of functionality: This URCap enables sending a movej() or popup() command to the secondary client interface, by pushing a button in the GUI. It implements the class clientSendScript.java which handles connection, transmission of script, and termination of the necessary socket. According to the URScript manual, two pre-defined functions has been implemented, namely movej() and popup(). For demonstration, this has been put into use in a program node with b…

---

_[View the full topic](https://forum.universal-robots.com/t/how-can-i-run-a-script-outside-the-generatescript-method/8018)._
