• 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
mail.app: can't get selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mail.app: can't get selection


  • Subject: mail.app: can't get selection
  • From: tim <email@hidden>
  • Date: Sun, 5 Jun 2005 11:20:36 +1000

Hi,
I've been trying to write a script to rewrite the source of an email in mail.app

I keep getting stumped at just trying to get the message I have selected

1. I f i say "tell application return selection" i get a list containing (apparently) a meesage reference
but i can't say "get item 1 of selection" : this returns the error can't make reference.
Also can't access any property of any item of what should be a  list of selected messages.

Any clues on this?

Secondly, this script just seems wierd: how can p not be defined when it has been iterated over?

tell application "Mail"
    repeat with anitem in selection --two messages selected
        set p to anitem
    end repeat
    return p

    --applescript error the variable p is not defined
    

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: mail.app: can't get selection
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: need something faster
  • Next by Date: Re: mail.app: can't get selection
  • Previous by thread: Re: Intel Backslide
  • Next by thread: Re: mail.app: can't get selection
  • Index(es):
    • Date
    • Thread