3

After upgrading to OS X 10.11 El Capitan I have problems accessing properties of chats in the Messages app using osascript.

It is easiest shown in the Terminal using javascript in osascript interactive mode but occurs as well in file-based scripts, as well as in applescript and javascript alike.

Consider the following:

$ osascript -l JavaScript -i
>> Application("Messages").services.length
=> 5
>> Application("Messages").services.at(0).id()
=> "07612B84-A058-4440-B33C-4D4E2DA90E7F"
>> Application("Messages").chats.length
=> 89
>> Application("Messages").chats.at(0).id()
!! Error on line 1: Error: Can't get object.

I had a running script in 10.10 that would send a text message to a specific chat based on a specific set of participants. This no longer works in 10.11 because I can't access the participants property of chats (nor any other properties).

Has anyone else experienced this? Are there workarounds?

Update: Just verified that this behavior still persists in 10.11.1 - 10.12

Harry
  • 103
  • 7

0 Answers0