繁体   English   中英

用applescript发送短信

[英]send text message with applescript

我想在OS X Yosemite上使用AppleScript和iCal自动向我的一个叔叔发送短信。 这可能吗? 这是我写的AppleScript:

using terms from application "Messages"
on service_type with SMS
    send this_Message to this_buddy with this_Chat
    set this_name to the name of this_buddy
    if the name of this_buddy is in {Uncle, Jose} then
        set canned_responses to {Happy, Birthday, Uncle, Hose}
        set this_messsage to canned_responses
    end if
end service_type

最终使用来自

这样行吗? 还不是他的生日,所以我真的不能运行该脚本,我的意思是可以,但是它没有给出任何反馈。 任何帮助,将不胜感激。

tell application "Messages"
    -- Create variable containing the name of how your uncle is listed in your contacts
    set theBuddy to buddy "Contact name"

    -- Send the text. Change "Text message" to your own message
    send "Text message" to theBuddy
end tell

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM