Asks VoiceOver to speak an announcement, using the user's VoiceOver voice and settings.
Does nothing if VoiceOver isn't running.
Announcements are sent with VoiceOver's AppleScript support, which works while another app
is in front. Two things must be allowed first:
"Allow VoiceOver to be controlled with AppleScript" must be turned on in VoiceOver Utility's
General settings.
Hammerspoon 2 must be allowed to control VoiceOver. macOS asks the first time an announcement
is made; afterwards it's in System Settings → Privacy & Security → Automation.
If either is missing, the Promise resolves to false and a warning is logged to the Console.
Announcements are passed to VoiceOver one at a time, in the order they were made.
Parameters
text: string
The text to announce.
Returns Promise<boolean>
Resolves to true once VoiceOver has accepted the announcement, or false if VoiceOver isn't running or refused it
Asks VoiceOver to speak an announcement, using the user's VoiceOver voice and settings. Does nothing if VoiceOver isn't running.
Announcements are sent with VoiceOver's AppleScript support, which works while another app is in front. Two things must be allowed first:
If either is missing, the Promise resolves to
falseand a warning is logged to the Console. Announcements are passed to VoiceOver one at a time, in the order they were made.