开发者

How can I make applescript voice recognition listen for any word?

开发者 https://www.devze.com 2023-04-11 09:19 出处:网络
How can I make applescript voice recognition listen for any word? This is what I have so far: tell application \"System Events\"

How can I make applescript voice recognition listen for any word? This is what I have so far:

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

I would like to substitute the copy on the first line to listen for any w开发者_Python百科ords.


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

Speakable items have to be enabled first:

How can I make applescript voice recognition listen for any word?

How can I make applescript voice recognition listen for any word?

See http://macscripter.net/viewtopic.php?id=24662 for more detailed instructions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号