在没有好友ID的情况下使用OsaScript发送Imessage

问题描述

有人可以告诉我如何将消息发送给以前未使用消息发送过消息的人。当我使用下面的代码时,收到错误消息:execution error: Messages got an error: Can’t get buddy id "..."(如果以前没有给他们发送消息。.

on run {targetBuddyPhone,targetMessage}
    tell application "Messages"
        set targetService to service "SMS"
        set targetBuddy to buddy targetBuddyPhone of targetService
        send targetMessage to targetBuddy
    end tell
end run

提前谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)