我如何才能使用AppleScript语音识别来听取任何单词?这就是我到目前为止所做的:
tell application "System Events"
keystroke "c" using {command down}
end tell
tell application "iCal" to activate
tell application "System Events"
keystroke "n" using {command down}
keystroke "v" using {command down}
keystroke return
end tell
我想用第一行的副本替换任何单词。
答案 0 :(得分:3)
tell application "SpeechRecognitionServer"
set answer to listen for {"yes", "no"} with prompt "prompt"
--hold the listening key (by default escape) to record an answer
end tell
必须首先启用可说话的项目: