Created
November 14, 2019 22:33
-
-
Save kristopherjohnson/3f0a85513e839b89f68960256df5a171 to your computer and use it in GitHub Desktop.
Friendly AppleScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "SpeechRecognitionServer" | |
set possibleResponses to {¬ | |
"hello", ¬ | |
"good bye", ¬ | |
"good morning", ¬ | |
"good afternoon", ¬ | |
"good night", ¬ | |
"nice to meet you", ¬ | |
"pleased to meet you", ¬ | |
"how are you", ¬ | |
"hi", ¬ | |
"hey", ¬ | |
"how's it going", ¬ | |
"yo", ¬ | |
"good evening", ¬ | |
"quit"} | |
repeat | |
set theResponse to (listen for possibleResponses with prompt "Hello") | |
if theResponse is "good bye" or theResponse is "quit" then | |
exit repeat | |
end if | |
say theResponse & "?" | |
end repeat | |
say "Good bye." | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment