2015-02-01 3 views
1

Я хотел бы автоматизировать отправку текстового сообщения специальному дяде, используя AppleScript и iCal на OS X Yosemite. Это возможно? Это AppleScript я писал:отправить текстовое сообщение с 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 

конца, используя термины из

Будет ли это работать? Это не его день рождения, поэтому я действительно не могу запустить сценарий, я имею в виду, что могу, но он не дает никакой обратной связи. Любая помощь будет оценена по достоинству.

ответ

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 
Смежные вопросы