【问题标题】:send text message with applescript用applescript发送短信
【发布时间】:2015-02-01 04:02:14
【问题描述】:

我想在 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

使用来自的术语结束

这行得通吗?现在还不是他的生日,所以我真的无法运行脚本,我的意思是我可以但它没有提供任何反馈。任何帮助将不胜感激。

【问题讨论】:

    标签: macos sms applescript osx-yosemite


    【解决方案1】:
    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
    

    【讨论】:

      猜你喜欢
      • 2019-04-24
      • 2017-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多