You are not logged in.
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".:
Applescript:
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
Offline
You were close to the target:
Applescript:
on run {input, parameters}
tell application "System Events" to 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 "Export as" of menu item "Export as" of menu "File" of menu bar 1
end tell
return input
end run
Last edited by KniazidisR (2019-10-19 04:38:40 am)
Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 13.1
Ram: 4 GB
Offline