G’day again. Fixed my problems (actually 2 of ‘em)
1. I noticed a caution sign in the left report column of Xcode, for the particular App, so ran it, and it then compiled.
2. If you try and set an Accessibility tick box, while the Finder is displaying a ’display dialog’, the tick goes unrecognised. Once I used ’System Events’, with Shane’s icon 0, everything worked, so thanks Shane.
Now, a new, more serious problem. I’ve spent two hours trying to save a complete Mail email as an .emlx, but what once worked, errors now.
The condensed code, running under Sierra GM, is below… It will no longer recognize ‘document’, in Mail. Using ‘window’ is ignored, no error. ‘message’ errors.
Any suggestions, please. Nothing on the net as yet, that still works.
The emails ‘content’ can be saved as an rtfd, but that’s unsatisfactory for what I’m doing. I am saving the Attachments separately, and processing them, but my clients want an actual .emlx backup.
Regards
Santa
property pathToDesktop : (path to desktop) property printDateTimeName : (current date) as text
tell application "Mail" activate open first message of mailbox "* items to manually process" try say 101 save front document in file ((my pathToDesktop) & my printDateTimeName & ".emlx" as rich text) on error try say 102 save front document in file ((my pathToDesktop) & my printDateTimeName & ".eml" as rich text) on error errmsg tell application "System Events" activate display dialog "Could not save Mail document in file " & ((my pathToDesktop) & my printDateTimeName & ".rtfd" as text) & " " & errmsg giving up after 20 end tell end try end try end tell
|