通过消息应用程序发送短信的简单 AppleScript 失败并出现错误 MacOs Monterey 12.0.1
我希望使用 AppleScript 自动发送 SMS 文本,以控制 MacOS Monterey (12.0.1) 中的消息应用程序。我非常简单的测试脚本失败,并显示如下错误消息:
tell application "Messages"
send "Test" to participant "123456789" of account "SMS"
end tell
运行脚本失败并出现以下错误:
错误“消息出现错误:无效的密钥表单。”来自帐户“SMS”的号码 -10002
显然,我使用的是我的联系人中的有效电话号码(我自己的)(事实上,脚本编辑器可以识别该号码并通过下拉列表提供其他信息)。 我使用的 MacBook Pro M1 设置为发送和接收短信,我一直使用它。如果我尝试通过将“SMS”替换为“iMessage”来发送 iMessage,我会得到相同的结果。感谢您的帮助。
I wish to automate the sending of SMS texts using AppleScript to control the Messages app in MacOS Monterey (12.0.1). My very simple test script fails with an error message as below:
tell application "Messages"
send "Test" to participant "123456789" of account "SMS"
end tell
Running the script fails with this error:
error "Messages got an error: Invalid key form." number -10002 from account "SMS"
Obviously, I am using a valid phone number (my own) which is among my contacts (in fact, Script Editor recognizes the number and offers additional info via a drop down list).
The MacBook Pro M1 I'm using is setup to send and receive text messages, I use that all the time. I get the same result if I try to send an iMessage by replacing "SMS" with "iMessage". Thank you for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试:
注意:您可能无法自己发短信,并且您可能需要已经给收件人发短信。
Try:
Note: You may not be able to text yourself, and you may need to already have texted the recipient.