• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail: Create New Message script broken on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail: Create New Message script broken on Leopard


  • Subject: Re: Mail: Create New Message script broken on Leopard
  • From: Vinay Prabhu <email@hidden>
  • Date: Mon, 31 Dec 2007 12:29:04 +0530

Thanks for the help.
I have changed the Applescript and it worked.

-Vinay

On Dec 29, 2007, at 11:46 PM, Michelle Steiner wrote:

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 (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to 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
References: 
 >Mail: Create New Message script broken on Leopard (From: Vinay Prabhu <email@hidden>)
 >Re: Mail: Create New Message script broken on Leopard (From: Michelle Steiner <email@hidden>)
 >Re: Mail: Create New Message script broken on Leopard (From: Vinay Prabhu <email@hidden>)
 >Re: Mail: Create New Message script broken on Leopard (From: Michelle Steiner <email@hidden>)
 >Re: Mail: Create New Message script broken on Leopard (From: Vinay Prabhu <email@hidden>)
 >Re: Mail: Create New Message script broken on Leopard (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Leopard and "new file"
  • Next by Date: how can i hide an app?
  • Previous by thread: Re: Mail: Create New Message script broken on Leopard
  • Next by thread: Open Safari and Script
  • Index(es):
    • Date
    • Thread