2

我有 Mac OS X Mountain Lion (10.8.x),虽然我很欣赏通过 GUI 提供的“消息”功能,但我正在尝试找到一种通过命令行向另一个人的手机发送 iMessage 的方法。有谁知道如何做到这一点?

我不希望使用“打开 Messages.app”来操纵脚本,但如果这是目前唯一可行的方法,请尊重。

4

3 回答 3

3
osascript -e 'tell application "Messages" to send "Hello World" to buddy "(your buddy name)"'
于 2014-03-14T18:58:18.623 回答
1

我找到了一个简单的方法来做到这一点。如果您安装了 brew,只需运行“brew install iMessage”。然后运行“iMessage -t yourmessage -c contact@email.com”。

于 2017-03-15T04:53:58.700 回答
-1

I don't think it's possible the apple developer site doesn't mention that and probably it's because they don't want to give opportunity to programmatically send messages (i think spambots are a concern) because it could be potentially annoying to receive automated messages but you could use notifications that it's specifically thinked to do what you are asking

于 2013-01-27T13:47:23.367 回答