WSC Referring to DOPUS object

Hello,

I am have moved servers (real headache) and was wondering if the DOPUS object can be referred to in WSC scripts somehow. Eg Dopus.Output "BW".

I'd like to use a WSC script as a library as detailed in the documentation however I can't see how to refer to the DOpus object.

Kind regards

Adam

Linking the FAQ for context:


I'm assuming we're talking about WSC script libraries when called from Opus, and not about trying to use Opus objects from scripts run outside of Opus.

I've never used WSC script libraries myself, but if you can't use the Opus objects directly, I'd expect it to still work if you pass the objects in from the main script which loaded the library.

You could pass the DOpus object to each function call, or have an "Init" function inside the WSC library that you call just after creating it and which stores the DOpus object in a global variable, after which the rest of the code in the library can refer to that variable. If you call the variable "DOpus" then the rest of the code will be the same as if it was directly in the main script/button/hotkey.

Thanks Leo, this is very much appreciated.
Kind regards
Adam