• 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: scripting mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting mail


  • Subject: Re: scripting mail
  • From: Philip Aker <email@hidden>
  • Date: Mon, 29 Jul 2002 01:50:45 -0700

On Sunday, July 28, 2002, at 04:15 PM, cricket wrote:

If there was a single reason that would entice me to buy OS X 10.2 it would be that Mail will have AppleScript commands for dealing with 'the selection' (meaning the currently selected text in an incoming message window). I actually just need a copy command.

Is this a part of "more extensive"?

It's possible to get the selected message as an object in Jaguar Mail, but Applescript support for getting the text of a selection is not yet implemented in Cocoa, sorry.

8-/


Can you give more details on what you're wanting to do? Might be possible to do another way.

Hello cricket,

I would like to use a single key-command to append the text selection to a text file. A text file whose name is derived from the name of the current mailbox. Typically, I put a CR, a few delimeter characters and another CR after the latest entry in the text file. The messages from this list go into my "applescript" mailbox. Like any other list, there's a lot of dross along with the good stuff. I only need the good stuff in my text file--which for this list is called "applescript.txt" and is located in a folder along with the text files from all my other lists. When I want to find something later on, then I just batch-regexp through the file(s).

Currently, Mail doesn't even support a "copy" command. I must admit, I'm having trouble fathoming why the most basic editing commands (i.e. Cut, Copy, Paste, Delete, and Select All) are not supported (AppleScript-wise) in an essential application like Mail. Or perhaps more accurately, wondering why these weren't the first things Cocoa didn't implement in it's basic AppleScript support for applications with text considerations. That's just plain common sense. Seems to me, grabbing a pointer to the selection range is already in place because of drag & drop technology.

I can send you plain ol' C examples of how to implement custom AppleEvents if you'd like. They could be used for Mail until Cocoa formalizes the methods...


Best wishes,


Philip Aker
http://www.aker.ca

'
_______________________________________________
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: scripting mail (From: cricket <email@hidden>)

  • Prev by Date: Q: Does someone already have a > hard wrapper?
  • Next by Date: Re: Bounding Rectangle [and data type Rect]
  • Previous by thread: Targeting a remote script
  • Next by thread: Re: scripting mail
  • Index(es):
    • Date
    • Thread