General Question Gig Script / GlobalScript

Is there a way to reference read / set the high level Gig Script variables in the Globalscript and vice versa or do I need to send OSC messages between them. There do not seem to be many script examples for the Gig Script area.
Thanks
Damian

There is a way via Environment Variables

SetEnvVariable(<name : String>, <value : String>)
GetEnvVariable(<name : String>)

So a gig script can set such an variable and the global script can read that.

ah great thanks

These environments (Gig Script, Rig Script, Global Rackspace Script, Rackspace Script, etc) are deliberately isolated from each other for various reasons (see below for one example). While you can use environment variables or communicate among them using OSC messages, you can get into trouble with race conditions with such things and we cannot officially support/help fix issues when such techniques are used.

  • Trivial example of such problems
    Consider what can happen if you set an environment variable to one value in a gig script and set the same environment variable to a different value in the global rackspace script. You cannot control the order in which those two assignments occur and consequently one script could see value A while the other script sees the value B. All sorts of nasty bugs can occur as a consequence.