Friday, July 30, 2010

#1 2005-08-26 09:38:47 am

scorpio
Member
Registered: 2005-08-26
Posts: 1

mail.app: bugs with "outgoing message" and "set theReply to reply ..."

Hello,

I wonder why I cannot find any information on google regarding these problems, as I think it should be quite a common task for scripting:
I wanted an applescript to:
1. reply a selected message
2. change the subject appending a certain word

Should be easy, isnt it?!

Well, look at this

Applescript:


tell application "Mail"
   set sel to selection
   set theMessage to the first item of sel
   set theReply to reply theMessage
   get subject of theReply
end tell

Error: The variable theReply is not defined.
Uhuh, well, so it sort of looses the reference to the fresh reply.
No problem, let´s get it through "outgoing messages":

Applescript:


tell application "Mail"
   set outMes to outgoing messages
get outMes
end tell

result: {application "Mail", application "Mail", application "Mail", application "Mail", application "Mail"}

Dont even try to access something like "get subject of firrst item of outMes" or the like.
I cannot even think of what happened here.

Very interesting. The only way to get a veritable "outgoing message" seems to be to "set foobar to make new outgoing message with blabla" BUT this will not work for assembling a reply because  you cannot get the content of the selected message if there is anything but plaintext in it.

Uhm, Apple, excuse me, are you guys at the mail.app department smoking to many iPots or something?

Anybody any help? Thanks a lot in advance ...
AppleScript v1.10
Mail.app 2.0.3
Mac OS 10.4.2

lucas

Last edited by scorpio (2005-08-26 09:39:43 am)


Filed under: mail

Offline

 

#2 2006-04-02 08:49:49 am

Nik
Member
From: Colorado
Registered: 2005-11-09
Posts: 24
Website

Re: mail.app: bugs with "outgoing message" and "set theReply to reply ..."

I'm having the same problem. I sent a bug report to Apple.

Offline

 

#3 2006-06-08 03:16:19 pm

hmhalff
Member
Registered: 2006-01-24
Posts: 1

Re: mail.app: bugs with "outgoing message" and "set theReply to reply ..."

I have no solution to this problem, only more information.

Neither of the commands forward nor reply return a value. They are supposed to return a reference to the outgoing message that they create.

The reference "outgoing messages" or equivalently "every outgoing message," returns a list of n items, each of which is a reference to the application "Mail." The count, n, is 1 + the real number of outgoing messages.

The reference "outgoing message i" does not return a result even when outgoing message i or outgoing message i - 1 exists.

I won't speculate on what the root of these problems is. They're apparently all related.

Last edited by hmhalff (2006-06-08 03:17:14 pm)

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.115 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)