Dear friends,
I am trying to create a quick action (activated by right click) for WAV to m4a conversion process: I discovered that quicktime player has an option File->Export as-> Audio only…->
I want to imitate the clicks on the menu but cannot “click” on the “Audio only…” while File and Export as are “clickable” via Applescript.
This is the script I am trying to run - the line with “->” gives an error System Events got an error: Can’t get menu item “Audio only…” of menu item “Export as” of menu “File” of menu bar 1 of process “QuickTime Player”.:
on run {input, parameters}
tell application "System Events"
tell process "QuickTime Player"
set frontmost to true
click menu "File" of menu bar 1
click menu item "Export as" of menu "File" of menu bar 1
-> click menu item "Audio only..." of menu item "Export as" of its menu "File" of menu bar 1
end tell
end tell
return input
end run
I will highly appreciate any ideas regarding the general task and the error in particular.
Thanks