> Found the denemo-console.exe
Using v2.2.1 with the console. I find that using the console to start Denemo actually changed at least one functioning in regards to Windows: Now I can minimize the program by just clicking on the Windows taskbar, which I was unable to do with either old or new version when launched with just denemo.exe. That one change felt like a good performance enhancement (since I usually have pdf viewer, text files, images, folders, browser, frescobaldi also open [you know the deal], I'm frequently switching windows via the taskbar).
This is what I've got so far, and I believe you had already achieved a solution for changing duration (4th to last directive below) in a more elegant manner. Currently the duration in the script is changed manually when needed. I wouldn't be surprised if you're a bit further along, but this was working in a few test runs. Obviously it would be easy to invert things to work from the top-down as well.
(d-Copy)
(d-MoveToStaffUp)
(d-SelectionToEmptyMeasure)
(if(EmptyMeasure?)(d-MoveCursorLeft))
(if(FullDurationMeasure?)(d-MoveCursorRight))
(d-UnsetMark)
(d-Paste)
(d-MoveCursorLeft)
(d-Change1)
(d-OctaveUp)
(d-ShiftRealDialogUp)
(d-MoveToStaffDown)