# Creating global variable in generateScript

**URL:** <https://forum.universal-robots.com/t/creating-global-variable-in-generatescript/1989>\
**Category:** URCap Development\
**Created:** [May 16, 2018, 6:53am UTC](https://forum.universal-robots.com/t/creating-global-variable-in-generatescript/1989 "2018-05-16T06:53:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![m.birkholz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/m.birkholz/32/7084_2.png) [@m.birkholz](https://forum.universal-robots.com/u/m.birkholz)\
**Post date:** [May 17, 2018, 6:20pm UTC](https://forum.universal-robots.com/t/creating-global-variable-in-generatescript/1989/6 "2018-05-17T18:20:46Z")

</div>

Take a Look at @jbm’s example: [Can urcap send and execute ur script within the program node? - #12 by jbm](https://forum.universal-robots.com/t/can-urcap-send-and-execute-ur-script-within-the-program-node/378/12)

You can use this class to send a urscript command when the button is pressed

---

_[View the full topic](https://forum.universal-robots.com/t/creating-global-variable-in-generatescript/1989)._
