Create a global variable from script editor

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
doc11
Posts: 5
Joined: 01 Oct 2018 11:39

Create a global variable from script editor

Post by doc11 » 18 Mar 2019 09:01

it is possible to create a global variable from the script editor?

ariloc
Posts: 99
Joined: 05 Jun 2016 21:36

Re: Create a global variable from script editor

Post by ariloc » 18 Mar 2019 09:37

If you mean to create a global variable from any script action that you use, you can do so as you would create a normal variable, as the only thing that makes a variable, global, is that it needs to start with global_ . So if you want to create a global variable in a script, you can do something like this:

Code: Select all

global_example = "example content";
So that will create a global variable called global_example whose value is a string that is example content.

doc11
Posts: 5
Joined: 01 Oct 2018 11:39

Re: Create a global variable from script editor

Post by doc11 » 18 Mar 2019 10:39

Thank you, that's exactly what I was looking for.

Post Reply