Mail:Reine Text Email via Skript estellen
my new_mail("test_betreff", "keinevalideEmailAlsoGarNichtErstVersuchen@hubionmac.com", "Was ich schon immer mal schreibe wollte")
my switch_to_reinen_text()
on new_mail(email_betreff, toadresse, Mail_text)
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:email_betreff as text}
tell newMessage
set visible to true
make new to recipient at beginning of to recipients ¬
with properties {address:toadresse}
set content to Mail_text
--make new cc recipient at beginning of cc recipients ¬
-- with properties {address:ccadresse}
end tell
end tell
end new_mail
on switch_to_reinen_text()
activate application "Mail"
tell application "System Events"
get system attribute "sysv"
if result is greater than or equal to 4144 then -- Mac OS X 10.3.0
if UI elements enabled then
tell application process "Mail"
if (name of menu item 11 of menu 1 of menu bar item 8 of menu bar 1) = "In reinen Text umwandeln" then
keystroke "t" using shift down & command down
end if
end tell
else
beep
display dialog "GUI Scripting is not enabled" & return & return & "Open System Preferences and check Enable Access for Assistive Devices in the Universal Access preference pane, then run this script again." with icon stop
if button returned of result is "OK" then
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
end if
end if
else
beep
display dialog "This computer cannot run this script" & return & return & "The script uses GUI Scripting technology, which requires an upgrade to Mac OS X 10.3 Panther or newer." with icon caution buttons {"Quit"} default button "Quit"
end if
end tell
end switch_to_reinen_text
Letzte Kommentare