Skip navigation

Mail Applescript "set new mail sound" -> Apple Event handler failed

1115 Views 7 Replies Latest reply: Jul 31, 2012 2:23 PM by Jim Downward RSS
Jim Downward Level 1 Level 1 (10 points)
Currently Being Moderated
Apr 16, 2012 1:36 PM

The following Applescript segment works in Snow Leopard and fails in Lion with "AppleEvent handler failed. number -10000"

 

tell application "Mail"

          set new mail sound to "Glass"

end tell

 

In addition, the Apple-supplied, Mail Applescript for gathering Mail information "Display All Accounts and Preferences.scpt" fails

(again with "AppleEvent handler failed. number -10000") on the line

 

                    set displayString to displayString & my formatFields("New mail sound", new mail sound) & return

 

The Console Log reports the following error.

 

 

Mail: [<MailApp 0x7fd6a9e009a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key newMailSound.

 

The Mail Applescript property "new mail sound" appears not to be recognized correctly.

 

I do not have any Mail plugins.  Several additional sounds have been added to the system sound set.  Mail reports no problems using them.

 

Under Snow Leopard, I used the same Applescripts (fired off by iCal) which turned on/off Mail's New Mail Sound depending on the time of day, i.e. I  set the new mail sound to be "Silent Alert" in the evening and restored it to my default new mail alert in the morning.  Any guidance as to what might be wrong and how to solve this problem would be very welcome.

 

 

iMac, Mac OS X (10.7.3)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.