Can't get "Set Note Info" window on Monterey AppleScript

Hi there!

Since updating to MacOS Monterey, the “Set Note Info” window is not accessible anymore via AppleScript. Does anyone know of any other command that would do the trick? My script (to quickly turn a note to a slashed grace note)—that worked on Catalina—is:

AppleScript code
-- "Convert the selected note to grace note" command (using a command line program called "sendmidi")
do shell script "eval $(/usr/libexec/path_helper -s); sendmidi dev SessionKiano ch 7 on 30 1"
delay 0.1
-- Open "Set Note Info" (using the same cl program called "sendmidi")
do shell script "eval $(/usr/libexec/path_helper -s); sendmidi dev SessionKiano ch 7 on 29 1"
delay 0.1

-- tick the "crossed" checkbox
tell application "System Events"
	tell process "Cubase 12"
		click checkbox "Crossed" of window "Set Note Info"
		-- hit apply
		click button "Apply" of window "Set Note Info"
	end tell
	-- press the "escape" key (to close the window)
	key code 53
end tell

Hi,

Does the sendmidi work for you in general?

I don’t know about other versions, but sendmidi 1.0.15 works fine on my macOS OpenCore installation.


I figured though what the problem was. I needed to add the following line before the “System Events” tell:

tell application "Cubase 12" to activate
Full working script
-- "Convert the selected note to grace note" command (using a command line program called "sendmidi")
do shell script "eval $(/usr/libexec/path_helper -s); sendmidi dev SessionKiano ch 7 on 30 1"
delay 0.1
-- Open "Set Note Info" (using the same cl program called "sendmidi")
do shell script "eval $(/usr/libexec/path_helper -s); sendmidi dev SessionKiano ch 7 on 29 1"
delay 0.1

-- new line
tell application "Cubase 12" to activate

-- tick the "crossed" checkbox
tell application "System Events"
	tell process "Cubase 12"
		click checkbox "Crossed" of window "Set Note Info"
		-- hit apply
		click button "Apply" of window "Set Note Info"
	end tell
	-- press the "escape" key (to close the window)
	key code 53
end tell

In MacOS Catalina the script worked no matter if this line was present or not… Interesting.

1 Like