Q: AppleScript and fetching contacts with emoticons
I'm using the SpeechRecognitionServer dictionary and the Contacts dictionary.
I loop through each person in the contact list and add their name to a list called contactList. Then I have:
tell application "/System/Library/PrivateFrameworks/SpeechObjects.framework/Versions/A/SpeechRec ognitionServer.app"
set query to listen for contactList
end tell
If I try to run this, I get an error that contactList doesn't understand the "listen for" message. I know it should work because it is within the tell block for the SpeechRecognitionServer. If I swap out {"Hello"} for contactList, then it works fine. Now here's the weird thing. Some of my contacts' names include emoticons on the end. I tried removing the emoticons from their listings in the Contacts app, and then the AppleScript works fine! Is there some issue between Contacts, SpeechRecognitionServer, and emoticons? Maybe an AppleScript list doesn't understand how to process emoji. My question is, can anyone reproduce this, and is this a bug or is there something I need to fix in my script?
NOTE: There is no space in the above script on the first line between the "c" and the "o." I am not sure why it appears that way here.
Posted on Sep 5, 2016 4:39 PM