Script issue

Hello,

Anybody can help me with this one ?
I recorded this very simple script to apply an artificial harmonic (fourth) to selected note(s)

local app=DoApp.DoApp()
app:doCommand([[Edit.SelectAtPoint?X=3284.33&Y=271&AddToSelection=0&BlockSelection=0&NextSelectionAtPoint=0&SelectionTriggerAction=0]])
app:doCommand([[UI.InvokePropertyChangeValue?Type=kNoteHarmonicType&Value=string: "kArtificial"]])
app:doCommand([[UI.InvokePropertyChangeValue?Type=kNoteHarmonic&Value=int: 4]])

Nevertheless, when I apply the script I end up with a second partial harmonic.
Screen Shot 2021-10-10 at 08.49.11
Any idea ?

Thanks
Yan

I don’t think this script will work in the general case anyway, because the first command is a selection command that is wired to a specific pair of X/Y coordinates.

yes indeed; stupid from my part. I didn’t pay attention to that in the first line.
And it doesn’t work without that line anyways…

Yan

It seems that these two commands cannot be used in succession in the script. It may be a bug.
So in between these two commands, I’ve inserted commands to toggle the properties panel. I think this script works correctly.

local app=DoApp.DoApp()
app:doCommand([[UI.InvokePropertyChangeValue?Type=kNoteHarmonicType&Value=string: "kArtificial"]])
app:doCommand([[Window.ShowBottomPanel]])
app:doCommand([[Window.ShowBottomPanel]])
app:doCommand([[UI.InvokePropertyChangeValue?Type=kNoteHarmonic&Value=int: 4]])

script harmonics partial 4

very nice…
thank you !!

best
Yan