After updating to Ventura my applescipt stopped working. I am trying to press the PDF button in numbers print menu. Code is below. Seems like the group line is the issue but can't seem to get it to work
Here is the code I tried
on run {input, parameters}
tell application "Numbers"
activate
--goes to print dialog box--
tell application "System Events"
keystroke "p" using command down
delay 0.5
keystroke "p" using command down
delay 0.5
--saves PDF to location--
tell application process "Numbers"
tell window 1
tell sheet 1
tell splitter group 1
tell group 1
delay 0.5
click button "PDF"
delay 1
end tell
end tell
end tell
end tell
end tell
end tell
end tell
return input
end run