Executing VoiceOver Command in JXA

32 Views Asked by At

The following AppleScript works.

tell application "VoiceOver"
    tell commander to perform command "item chooser"
end tell

However, the following JXA throws an error: "Error 6: An error occurred."

vo = Application("VoiceOver")
vo.commander.performCommand("item chooser")
0

There are 0 best solutions below