Mavericks and Mail Problems

Ok, so I use an AppleScript to allow me to reply to the selected message(s) in Mail. This worked fine under Mountain Lion, but now under Mavericks it doesn’t work.

Here is the error I get:

Apple Script Error Mail got an error: item 1 of {message id 54012 of mailbox "Inbox" of account "Work", message id 53941 of mailbox "Inbox" of account "Work"} doesn’t understand the “reply” message.

Here is my Apple Script Code:

tell application "Mail" set theSelection to selection if theSelection is {} then return activate repeat with thisMessage in theSelection set theSubject to subject of thisMessage as string repeat while theSubject begins with the "FW:" try set theSubject to characters (4) thru -1 of theSubject as string end try end repeat repeat while theSubject begins with the "RE:" try set theSubject to characters (4) thru -1 of theSubject as string end try end repeat repeat while theSubject begins with the " " try set theSubject to characters (2) thru -1 of theSubject as string end try end repeat set theOutgoingMessage to reply thisMessage with opening window and reply to all repeat until exists (window 1 whose name = "Re: " & theSubject) end repeat delay 0.1 tell application "System Events" keystroke "v" using {command down} -- ?A to select all end tell end repeat end tell

Under Mountain Lion, I was able to do this and call it from XOJO with no issues. Under Mavericks, I get the error that I posted above.

[quote=42523:@Christopher Wade]Ok, so I use an AppleScript to allow me to reply to the selected message(s) in Mail. This worked fine under Mountain Lion, but now under Mavericks it doesn’t work.
[/quote]
If you run this in Apple’s Script Editor do you get the same error ?
I’d expect you would which means the problem is Mail’s interpretation & execution of the script is the issue - not specifically a Xojo issue.

I’ve seen reports that suggest some portions of the iWorks suite have had their scripting dictionaries altered / trimmed / removed and that this is causing issues with previously working apple scripts.

This could be similar for Mail

[quote=42524:@Norman Palardy]…
I’ve seen reports that suggest some portions of the iWorks suite have had their scripting dictionaries altered / trimmed / removed and that this is causing issues with previously working apple scripts.
This could be similar for Mail[/quote]
Exactly, I just wanted to post the same thing.
AppleScript and OSX Mavericks

Yes, I have tried it there and get the same issue. So how about approaching this another way.

Does anyone know of a way that I can use Xojo to Reply To All to the currently selected messages and paste in clipboard contents (or add content from Xojo) to the beginning of the body of the message?

Well, I did find an alternate way of doing it.

Nothing near as fancy, but it accomplishes the job:

tell application "Mail" set theSelection to selection if theSelection is {} then return activate tell application "System Events" keystroke "r" using {command down, shift down} delay 0.5 keystroke "v" using {command down} -- ?A to select all end tell end tell