• 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
Scripting Apple Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Apple Mail


  • Subject: Scripting Apple Mail
  • From: Rob Stott <email@hidden>
  • Date: Wed, 30 Apr 2003 09:21:21 +0100

Hi all, I'm hoping one of you can help me with a simple problem scripting Apple Mail (I'm probably making a daft mistake).

I want the script below to read the content of the first message of a particular mailbox, then delete the message.

It reads the content perfectly, but fails to delete the message, giving me a "Mail got an error: An error of type 8 has occurred" message.



tell application "Mail"
activate
tell Mac account "email@hidden"
tell mailbox "H&S Questionnaires"
get content of first message
delete first message
end tell
end tell
end tell


Anyone have any hints or suggestions?
Thanks in advance

Rob
_______________________________________________
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.

  • Follow-Ups:
    • Re: Scripting Apple Mail
      • From: John Delacour <email@hidden>
References: 
 >Script in Script Editor MUCH faster than compiled app -- why? (From: Jeff Porten <email@hidden>)

  • Prev by Date: Re: Error: Stack overflow
  • Next by Date: Scripting an AppleWorks database
  • Previous by thread: Re: Script in Script Editor MUCH faster than compiled app -- why?
  • Next by thread: Re: Scripting Apple Mail
  • Index(es):
    • Date
    • Thread