Scripting: InitData vs ScriptInitData?

Is initData and ScriptInitData (in the Directory Opus manual) the same thing?

(I've split this into its own thread, since it doesn't really have any relation to EBook Columns other than that thread is about a script.)

You can find the list of scripting objects/types here, where ScriptInitData is documented:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/scriptingobjects.htm

The OnInit method which it gets passed to usually uses "initData" as the argument name.

So initData is usually the name of the argument, and ScriptInitData is the type. But you can name the argument anything you want, and it's just a convention to call it "initData" (as well as what the script maker in Opus will give you).

My apologies.

So in this instance, I could name the argument "Pizza", but it is my name for ScriptInitData. Then something like

"Pizza.version " would be the version number of the script, and so on for any other property I append

Yep, that's how function argument names work in VBScript, JScript and most languages. The order of the arguments is what matters, not the names.

1 Like