DO11: Opus Script Package format

Hey there, when one of you get a chance can you give some detail on exactly what a .OSP zip file should look like?

Specifically, how do we bundle the icon, and can we somehow reference an icon from an existing Opus icon set (default) rather than shipping an ICO or PNG or whatever? I tried dropping png and ico files with the same name as the script into the AddIns folder, but that didn't seem to be it :slight_smile:.

Basically, you create a sub-folder in the .osp file called icons and put the normal contents of a .dis file within it. You can then reference the icons from your script using setname:iconname. See the attached example.

If you want to use a stock icon for your command just give the icon name when you add the command, e.g.:

var cmd = initData.AddCommand(); cmd.name = "SelectNewest"; cmd.icon = "select";
Select Newest Files.osp (4.64 KB)

Cool thanks, hadn't noticed the icon property in ScriptCommand. Thanks for the sample!

Would it also be possible to put e.g a helpfile (*.txt or *.pdf) within the .osp package that can be called by a script command argument? If yes, how would this be implemented in the script (path to the file)?

Thanks for the sample Jon