Re: Mail: Create New Message script broken on Leopard
Re: Mail: Create New Message script broken on Leopard
- Subject: Re: Mail: Create New Message script broken on Leopard
- From: Michelle Steiner <email@hidden>
- Date: Sat, 29 Dec 2007 11:16:32 -0700
On Dec 29, 2007, at 12:48 AM, Vinay Prabhu wrote:
How to check for the number of signatures present in Mail app using
Apple Script?
tell application "Mail"
count of signatures
end tell
Here is the beginning of your sample script:
-- Display a list of all the user's defined signatures. Skip if no
signatures are defined.
tell application "Mail" to set everySignature to name of every signature
set theSignature to ""
if (count of everySignature) is greater than 0 then
set everySignature to {"None"} & everySignature
Change it to this:
-- Display a list of all the user's defined signatures. Skip if no
signatures are defined.
tell application "Mail"
set theSignature to ""
if (count of signatures) is greater than 0 then
set everySignature to {"None"} & name of signatures
end if
end tell
The original script appears to have been written before Tiger. Tiger
introduced the option of assigning signatures to accounts, so each
account could have a different grouping of signatures. If the script
assigns a signature not in that account's list of signatures, the
signature will appear, but the signature menu will say "none".
--
The invasion of Iraq is "a catastrophic success"
-- G.W. Bush, August 29, 2004
_______________________________________________
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