Applescript: activate the Score Editor window

Is it possible to set the focus on the Score Editor through Applescript? I don’t need to be told how. I just need to know if it’s possible. Thank you.

Found the solution! Yeeey!

-- delay variables
set delayOne to 0.2
set PageDelay to 2

-- set focus on the Score Editor
tell application "System Events"
	tell application process "Cubase 10.5"
		perform action "AXRaise" of (first window whose name contains "Scores")
		delay delayOne
		tell application "Cubase 10.5" to activate
		delay delayOne
	end tell
end tell
-- print with command+shift+p (must be created through the Key Commands window)
tell application "System Events"
	keystroke "p" using {command down, shift down}
	delay delayOne
end tell

source:

1 Like