Only Running Part of My Script

I made a little script to change notes to stemless slashes by recording a macro, when when I run the script only part of it runs.
It’s as follows

local app=DoApp.DoApp()

It recorded everything I wanted it to, but the result is stemmed slashes, not stemless.
I’m not too familiar with the system. Any ideas?

The scripting support in the program is pretty rudimentary at the moment, so it wouldn’t surprise me if it’s not possible to completely automate this at the moment. However, I don’t think you need all of the steps you’ve got in your script above. You might be able to get away with this:

local app=DoApp.DoApp()

which are the two actual important steps.

Thanks for the streamlining! Unfortunately this has the same issue: it changes the noteheads to slashes but doesn’t touch the stems. It shows the console when it runs, but the console just stays blank, so unfortunately I have no idea what’s actually happening.

I suspect the issue is that something is not quite right with the selection after the initial operation, so the next operation doesn’t complete successfully. Scripting is both very rudimentary and also more or less unsupported at this stage, I’m sorry to say.

No worries! What I’m trying to simulate is ‘comping’ notation, in which a rhythm section player has bars filled with stemless slashes per quarter note.

I’m brand new to Dorico so I haven’t tried this, but is it possible to edit the length of the stems so that they would = 0 length, effectively disappearing and leaving only the slashes? Just a thought.