2016-05-03 2 views
0

compose mode.setting値でoutlookメッセージ本文を取得して設定しようとしています。スクリプトに何か問題がありますか?価値を得ることはうまくいきます。composeモードでoutlookメッセージ本文をappleScriptを使用して設定できません

activate application "Microsoft Outlook" 
tell application "System Events" 
    tell process "Microsoft Outlook" 
      get value of static text 1 of group 1 of UI element 1 of scroll area 4 of splitter group 1 of window 1 
      set value of static text 1 of group 1 of UI element 1 of scroll area 4 of splitter group 1 of window 1 to "sample text"  

    end tell 
end tell 

答えて

1

他に方法がない限り、私はUIスクリプトを使用しないでください。

このスクリプトでは、メッセージ本文の設定方法を説明します。

tell (current date) to get (it's month as integer) & "-" & day & "-" & (it's year as integer) 
set MyDay to the result as text 
set Mytitle to "Daily Email - " as text 
set Mytitle to Mytitle & MyDay 

tell application "Microsoft Outlook" 

    set newMessage to make new outgoing message with properties {subject:Mytitle} 
    make new recipient at newMessage with properties {email address:{name:"Name", address:"[email protected]"}} 
    #make new cc recipient at newMessage with properties {email address:{name:"Name", address:"[email protected]"}} 

    --- SET EMAIL BODY USING PLAIN TEXT --- 
    set plain text content of newMessage to "This is just a TEST." 

    open newMessage 
end tell 
関連する問題