• 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 Mailbox Properties in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Mailbox Properties in Mail


  • Subject: Scripting Mailbox Properties in Mail
  • From: Hylton Boothroyd <email@hidden>
  • Date: Thu, 3 Jan 2008 22:31:21 +0000

[Mail 2.1.2, Script Editor 2.1.1, OS 10.4.11 on Intel MacMini with 2Gb memory]

I'm trying to repair a deficiency in the behaviour of Apple's Mail.app: it loses my selected View > Columns > Mailbox modification of settings every time I leave and return to my "Unread" smart mailbox. So what I ultimately want is something that corrects the selection on access -- I'm assuming there isn't a non-scripting solution to cure the problem once and for all.

I can't tell from my first experiments
whether what I am trying is in principle do-able,
whether I just need a bit of help in getting the right way of saying things,
whether a smart mailbox poses any additional scripting difficulties.


My first exploratory attempt

====
tell application "Mail"
set mailboxName to "Unread"
try
set (mailbox column of visible columns of mailboxName) to true
on error the error_message number the error_number
[a standard error handler from Script Editor's contextual menu]
end try
end tell
====


reports
   "Error: -10006. Can't set «class mvvc» of \"Unread\" to true."

It also reports the same error
  for "Humble" which doesn't exist
  for "Buying" which exists as a simple top-level mailbox.

Which doesn't narrow things down much!

So I would be grateful for any pointers at any level: Matt Neuburg's wonderful chapter on Dictionaries makes me think I won't make it on my own!

This is my first go at scripting in OS X, though I did plenty of simple personal scripts and adaptations in OS 9.
--
Hylton Boothroyd


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Scripting Mailbox Properties in Mail
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Fwd: Unexpected Argument problem
  • Next by Date: Import Playlist to iTunes
  • Previous by thread: Fwd: Unexpected Argument problem
  • Next by thread: Re: Scripting Mailbox Properties in Mail
  • Index(es):
    • Date
    • Thread