Update: while this method does work, at least sometimes, in the Designer machine using it made the machine very crashy. Studio would hang pretty often when setting/getting the global variable, although not consistently. I tried all the usual things like restarting the app, rebooting, etc. When not using these methods, it regained normal stability. I'm not sure what's going on, maybe a race condition somewhere, but we have no visibility into the process. So be careful, especially for a live situation.
------------------------------
- Ben
------------------------------
Original Message:
Sent: 03-07-2024 17:46
From: Ben Stahl
Subject: Global variables in the Scripting Engine
I can confirm this works. There was an older post suggesting to use the format ".GetValue" and ".SetValue" which DOES NOT work (maybe it did then).
------------------------------
Ben Stahl
Original Message:
Sent: 08-28-2013 05:33
From: Christopher Kelly
Subject: Global variables in the Scripting Engine
Hello Kenneth,
Globals have worked in the past for me. The syntax is...
Storing to Global Variable: _Global.Value("nameofvariable") = "Text Value Goes Here"
Recalling from Global Variable: TextObject.Text = _Global.Value("nameofvariable")
Naturally, you can plug in string, integers, or anything else. However, there's no way to explicitly determine what the type of variable is. So you have to be very explicit when you compare against globals. I basically treat them as strings, even though they may not be.
Hope that helps,
Chris
#XPression