I’m trying to write a script that will go through all the chats in the Messages app - my goal is to find all messages I haven’t replied to and send me an reminder.
But I’m stuck at square one - I can see how many message I have:
tell application "Messages" to log (count of chats)
But I can’t get even simple properties out of a chat; for example:
tell application "Messages" to set x to started of first chat
gives the error: Can’t get started of chat 1." number -1728 from started of chat 1
This only displays incoming messages. When I look in the database I can’t find any outgoing messages at all, unless they are encoded into something unreadable. Do you know anything about this?