@script JScript issue

No scripts using @script JScript seem to work for me, including any of the sample scripts (upon copy-pasting).

The scripts themselves run fine in Function: Script Function, but when switching to Standard Function, they stop working regardless of the directive. Upon running, it blinks and at very most outputs a blank line. No errors or anything.

A simple example:

@script JScript
function OnClick(clickData) {
 DOpus.Output("Test"); // or truly anything else

I tried @script JScript, @script:jscript, @script jscript as per the documentation.

Of course with the intention to put modifiers in front.

They should be set to Script Function, and the script language should be set via the drop-down menu.

You don't need @script JScript in any version of Opus from the last several years. (Although, behind the scenes, the drop-down menu inserts the same thing into the command.)

Only exception is when creating context menu commands, where it's still needed because we haven't updated those yet. (We overlooked that, but will be adding it soon.)

As for modifiers, there's a separate tab where you can put those when the command editor is in script mode.

If there's documentation that needs updating, please let us know the URL(s) so we can fix it.

Perfect! I even used the Modifiers but ended up saving it as a Standard Function for that's how it seemed to be done everywhere. :sweat_smile: Most prominently here:

Section 3:

This image in the manual:

And perhaps the explanation of @script in the manual could use a note as well:

Any other similar source I stumbled upon would be older (though relatively new, Opus 11/12) forum posts. So be it.


Rename scripts are special, since they run a normal command, and pass a script to it. (As opposed to running a script directly.)

The documentation you linked to on @script spells it out on the page, too:

This is mainly used for embedded rename scripts, because otherwise the script language is selected via a drop-down at the top of the script editor.

It didn't work for me however the script types were set, especially alongside the modifiers added on top instead of separately for it was never shown otherwise. That's what threw me off. It made me think embedded scripts could be of any kind, opposed to just rename (or context menu command) ones. :sweat_smile:

The JScript here resulted in the same empty output, even as a script. (I hadn't realized the modifiers and command had to be added before that script until much later, but with it giving the same empty result on its own, I thought none of it would be working, which led to this thread.)