Applescript:通过Skype转发邮件主题作为移动短信(SMS)

时间:2017-04-07 10:12:04

标签: applescript

在Apple邮件(Mail.app)中,我定义了一个在收到电子邮件时调用applescript的规则。脚本应通过Skype将邮件主题作为SMS消息发送(它还应发送发件人的姓名)。我已经有一个脚本工作,将一些硬编码文本作为短信发送,但我不知道如何将主题和发件人姓名从邮件传递到该短信。这是我的剧本:

# Code adapted from:
# http://photolifetoys.blogspot.de/2011/12/applescript-control-over-skype-call.html

# VARIABLES
set callToAnumber to "+01234567890"
set SMSmessageBody to " has sent a mail."
set SenderOfMail to "TheSenderOfTheEmail"
set MailSubject to "TheSubjectOfTheMail" 


# BODY
set smstext to "SenderOfMail" & SMSmessageBody as Unicode text
tell application "Skype"
    set message to send command "CREATE SMS OUTGOING " & callToAnumber script name "SMS"
    set smsid to item 2 of every word of message
    send command "SET SMS " & smsid & " BODY " & smstext script name "SMS"
    set result to send command "ALTER SMS " & smsid & " SEND" script name "SMS"
    #display dialog "SMS send! Text: " & smstext
end tell

1 个答案:

答案 0 :(得分:0)

现在我有了答案。这是代码:

<ul>
  <input id='chx1' class='chx' type='checkbox'>
  <label for='chx1' class='lbl'></label>
  <li>Text that's long and will wrap with an indentation like a list item with a bullet.</li>

  <input id='chx2' class='chx' type='checkbox'>
  <label for='chx2' class='lbl'></label>
  <li>Text that's long and will wrap with an indentation like a list item with a bullet.</li>

  <input id='chx3' class='chx' type='checkbox'>
  <label for='chx3' class='lbl'></label>
  <li>Text that's long and will wrap with an indentation like a list item with a bullet.</li>
</ul>