Where can DOpus variables be used?

Two questions about DOpus variables, just to check that I am not missing something.

  1. The following JScript code creates a new object "oTest" for which "oTest.a" and "oTest.b" are defined. It then saves this object as a DOpus variable, which AB's add-in "Manage Global Variables" reports as a Vector Object.

var oTest = new DoTest () DOpus.vars.set ("MyTest", oTest) function DoTest () { this.a = "Hello" this.b = "Goodbye" }QUESTION: Is it possible to use the two values of this variable in a standard non-script DOpus button? I expect that the answer is, "No, only string and numeric variables can be used in a standard DOpus button, not vector objects".

  1. QUESTION: Is it possible to gain access to and use a DOpus global variable (considering for the moment only numeric and string variables) from within other software installed on the computer? I am reasonably sure that the answer is, "No, setting an environment variable is the way to do this" (or write to a temp file).
  1. A non-script button isn't going to be able to access your custom-made JScript object, no. There's no way that could work.

  2. No, DOpus variables are variables that only DOpus is aware of.

  1. Putting js objects into DO variables does not work.
    But I guess you can serialize your object (results in a string) and save that. Look out for JSON.encode() and JSON.decode() for more details on that.
    The latter does not allow to use your object in non-script buttons though, but you can use them in a script button after decoding.

  2. DO stores all the variables in a xml-file, which you could read from another application.
    But you risk interfering with a running DO instance I guess and what's in the xml does not necessary reflect the current value of a var, as the file is written in intervals or on exiting DO. Other than that and to my knowledge, there is no way to access DO vars from outside.

I'd also like to see the DOpus object to be accessable as regular activex component like this: var DOpus = new ActiveX("DirectoryOpus");
We could make use of all the fancy things available in a lot of other scenarios (and access DO variables from nearly anywhere), until then, we don't. o)

Thanks, @leo and @tbone. The workarounds are dull, but reasonably straightforward. It's always worth asking because DOpus has so many surprises.