Re: I need to create a script that changes my email ID on mail.app
Re: I need to create a script that changes my email ID on mail.app
- Subject: Re: I need to create a script that changes my email ID on mail.app
- From: Iurista GmbH <email@hidden>
- Date: Tue, 14 May 2013 11:21:14 +0200
Am 12.05.2013 um 21.51 schrieb Kerry Dawson:
> I have been able to create two scripts for newly created emails - one which uses one email ID I use for friends on mail.app (iCloud) and another for business acquaintances. What I can't seem to do is create a script for an email like this that has my standard email address come up and I need to change that and the signature. What I'm doing is mousing or having Keyboard Maestro sometimes mimic the mouse actions but Applescript would be so much better.
>
> So my script is for a new email:
>
> tell application "Mail"
> activate
> set theMsg to make new outgoing message with properties {sender:"<email@hidden>", visible:true}
> set message signature of theMsg to signature "Kerry"
>
> end tell
>
> I just can't see how I can write a script without a syntax error that would send this email with my alternate id and signature. It seems so simple but constantly have syntax errors.
>
> Can anyone help with this.
>
> Kerry Dawson
> email@hidden
On which system version are you?
This works with my Snow leopard:
property WAHL1 : "Dieser Sender"
property WAHL2 : "Diese Signatur"
property ABBRUCH : "Abbrechen"
property HINWEIS1 : "Wählen Sie den Absender"
property HINWEIS2 : "Wählen Sie die Signatur"
property SEK : 2
set Senderliste to { "<emailadresss 1>", "<emailadresss 2>","<emailadresss 3>",}
set SigListe to {"IC", "IC Kurz", "", "Text1, signed rod at ic", "Text2, signed rod at ic", "", "Kanzlei kurz OW", "Kanzlei Kurz NW", "Kanzlei komplett", "", "ROD kurz NW", "ROD kurz OW", "ROD Normal NW & OW", "", "ROD IJ (short)", "ROD international Judge", "", "All inclusive", "OmniTalk Infos"}
set Absender to (choose from list Senderliste with prompt HINWEIS1 OK button name WAHL1 cancel button name ABBRUCH empty selection allowed 0 without multiple selections allowed)
if result = false then
return
else
set Absender to result as text
end if
set Signatur to (choose from list SigListe with prompt HINWEIS2 OK button name WAHL2 cancel button name ABBRUCH empty selection allowed 0 without multiple selections allowed)
if result = false then
return
else
set Signatur to result as text
end if
tell application "Mail"
activate
set newMSG to make new outgoing message with properties {sender:Absender, visible:true}
set message signature of newMSG to signature Signatur
end tell
Rudolf
--
The basic rule for a more liberal world:
If there's no necessity to make a law, there's a necessity to make no law.
This mail is from:
Rudolf O. Durrer
IURISTA CONSULT GmbH
Legal Counselors
Switzerland
email@hidden
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden