• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: myLoop: getting subject of messages in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: myLoop: getting subject of messages in Mail.app


  • Subject: Re: myLoop: getting subject of messages in Mail.app
  • From: John Delacour <email@hidden>
  • Date: Tue, 4 Mar 2003 09:54:30 +0000
  • Mac-eudora-version: 6.0a9

At 8:43 pm -0400 3/3/03, Bill Briggs wrote:

It doesn't, but it ought to, and this does:

tell application "Microsoft Entourage"
say "" & subject of message 1 of folder 1
end tell

And there's the rub. References evaluate some of the time, but not all of the time. To me that means it's got bugs.

Sure. I'm not sure when 'say' was incorporated into Standard Additions but so far as I recall 'say' was an old 3rd party osax that was appropriated without any inspection or revision. This is the case for a lot of elements of Standard Additions, many of them having originated in the GTQ suite, though GTQ's 'speak', better than 'say', was discarded. The clipboard stuff is Jon's, etc.

If 'say' needs a string, then 'say' ought to make sure it gets one.

At 9:20 pm -0600 3/3/03, Matthew Stuckwisch wrote:
I can only speculate, but it would seem to me that to add an evaluator to check to see if the variable is a reference and if so to evaluate it would slow down programs and make the code base bulkier.

First it would make no difference and second people who want speed don't use Applescript. The whole point of Applescript syntax is that it's supposed to be user-friendly and as much like English as possible. If you have to write

item 1 of (get selection) instead of

the first item in the selection

then this point is missed. Good implementations allow natural English-like syntax. Bad implementations forbid it.

In Mail, it is possible to use good syntax in this instance:

tell application "Mail"
get the subject of item 1 of the messages in the first mailbox of account 1
end tell

but not in this:

tell application "Mail"
get the subject of item 1 of the selection
end tell

In Tex-Edit Plus, and probably I can do

tell application "Tex-Edit Plus"
class of the selection
--> text
end tell

but in Mail I get an error.


JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: myLoop: getting subject of messages in Mail.app (From: cricket <email@hidden>)
 >Re: myLoop: getting subject of messages in Mail.app (From: Bill Briggs <email@hidden>)
 >Re: myLoop: getting subject of messages in Mail.app (From: John Delacour <email@hidden>)
 >Re: myLoop: getting subject of messages in Mail.app (From: Bill Briggs <email@hidden>)

  • Prev by Date: tell application - without the app's name?
  • Next by Date: Re: myLoop: getting subject of messages in Mail.app
  • Previous by thread: Re: myLoop: getting subject of messages in Mail.app
  • Next by thread: Re: myLoop: getting subject of messages in Mail.app
  • Index(es):
    • Date
    • Thread