On Apr 24, 2016, at 7:09 PM, Macs R We <[email protected]> wrote:
> For all the vaunted easy programmability advertised for AppleScript, my 
> experience has been that an AppleScript rarely works across two major 
> releases without needing to be debugged and rewritten to accommodate some 
> change in the OS.
> 
> I have a script that I wrote way back on Jaguar that takes all the messages 
> currently selected in Mail, constructs forwarded messages for each of them 
> that conform to SpamCop's requirements, ships them off to SpamCop, and then 
> moves them to a spam archive.  i've had to change it for changes in the 
> format of a new mail message, for the renaming of "Address Book" to 
> "Contacts," and for several other issues since Jaguar.

ail.app ha changed drastically since 10.2, in many fundamental ways.

You would be hard pressed to find any software that ran in 10.2 and required 
other software that would work on 10.11 with other software.

> 
> The most recent breakdown in this script was from Yosemite, I believe.  I 
> determined that the problem was that the lines:
> 
> tell application "Contacts"
>       activate

Works perfectly here. If you are putting that on two lines like that you must 
have an end tell to close the block.

tell application “Contacts” to activate

I’ve tried it both ways with Contacts running or not. Works.

> simply were NOT working.  If Contacts was already running, the script would 
> work fine.  If it wasn't, it would never launch, and the script would 
> silently do nothing.
> 
> I don't understand why this is so.  The Apple language ref clearly says it 
> should be launched if it isn't already running, but it isn't happening.

Do you have multiple copies of Contacts?

>       set spamcopPerson to first person whose nickname = 
> spamcopRecipientNickname

…

>       set spamcopPerson to first «class azf4» whose «class az43» = 
> spamcopRecipientNickname

Sounds like you have a broken copy of Contacts somewhere.

Search your system for other copies of Contacts and eliminate them. If that 
doesn’t seem to work, try rebuilding your LaunchServices Database. If that 
doesn’t work, subscribe to the Apple AppleScript list.

-- 
I wrote this song two hours before we met. I didn't know your name, or
what you looked like yet....

_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to