email - Saving a mail message in applescript -
email - Saving a mail message in applescript -
i'm new applescript , i'm having enormous problem doing seems basic. i'm trying save selected mail service message in rtf format attachments. here errant script:
tell application "mail" activate set allmessages selection set mymessage item 1 of allmessages open mymessage tell application "system events" tell process "mail" tell menu bar 1 tell menu bar item "file" tell menu "file" click menu item "save as…" delay 2 keystroke "test" click checkbox "include attachments" -- result: error end tell end tell end tell end tell end tell end tell
you can seek this:
set clipboard posix path of (path desktop text) & "test" tell application "mail" open first item of (get selection) activate end tell tell application "system events" tell process "mail" click menu item "save as…" of menu 1 of menu bar item "file" of menu bar 1 delay 3 perform action "axpress" of pop button 1 of grouping 1 of sheet 1 of window 1 click menu item 1 of menu 1 of pop button 1 of grouping 1 of sheet 1 of window 1 if value of checkbox "include attachments" of grouping 1 of sheet 1 of window 1 = 0 perform action "axpress" of checkbox "include attachments" of grouping 1 of sheet 1 of window 1 end if keystroke "g" using {command down, shift down} keystroke "v" using {command down} keystroke homecoming keystroke homecoming end tell end tell
email checkbox applescript
Comments
Post a Comment