Author Topic: Isolate profile variables  (Read 2631 times)

osageorange

  • Guest
Isolate profile variables
« on: March 23, 2018, 10:53:05 PM »
I'm not a programmer so sorry if I've used the wrong terminology.

Basically I'm requesting that if you run multiple profiles at the same time via the 'Profile Options - Include commands from other profiles' dialogue box that the variables used are segregated so the profiles can use the same variables without worrying about affecting a different profile.

An example:
So when Profile A (which includes commands from profile B) uses the variable entry, profile B can assign and use its own variable entry and not see Profile A's entry.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Isolate profile variables
« Reply #1 on: March 23, 2018, 11:21:08 PM »
You'll want to take a look at the section in the help documentation labeled, 'Advanced Variable Control (Scope)'.  In there, you'll find the various ways to scope variables in VA.  Variables scoped as, 'global' are shared no matter what profile is active.  Profile-scoped variables are private to their respective profiles, and command-scoped variables are private to their respective commands.

On a side note, when you include commands from other profiles, you're not really running all the referenced profiles at once.  Your selected profile is still the active profile with just the commands from the referenced profiles included.  Two profiles are never active at the same time.

Hope that helps!

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Isolate profile variables
« Reply #2 on: March 24, 2018, 03:41:42 PM »
Is it possible to create a profile scoped variable from a plugin?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Isolate profile variables
« Reply #3 on: March 24, 2018, 03:56:13 PM »
Is it possible to create a profile scoped variable from a plugin?

It is. The variable will be scoped to the profile that's active when the plugin action runs(even if the command containing the plugin action comes from an included profile).