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

Re: Mail scripting…


  • Subject: Re: Mail scripting…
  • From: awaw <email@hidden>
  • Date: Mon, 7 Apr 2008 18:54:51 +0200

I'm coming back…

Your solution is perfect if you know the name of the mbox (here "nubian/scripting") and write it explicitly in the script.

But I don't succeed in a script to know the fact that "scripting" is a sub folder of "nubian".
Is it possible?

How can I get this "property" and use it to construct dynamically the name of the mbox and reach
for example "Society/Computer/Apple" and then continue the script as under with "tell mailbox mbox"

There is a pseudo-code to illustrate my thinking.

 set xx to name of mailbox         -- "Society"

 If society has a subfolder then

     get name of that subfoder     -- "Computer"

     set xx to xx & "/" & result        -- "Society/Computer"
…/…
    set mbox to xx                          -- "Society/Computer/Apple"
    tell mailbox mbox                    
…/…

 Thanks for your help

Gérard


Le 31 mars 08 à 10:12, Philip Aker a écrit :
On 08-03-27, at 02:59, awaw wrote:

I notice also some strange "things" with Mail.
For example :
In my Mail application (v 3.2), I have organized my mail boxes (folders -"mailbox" for Mail- where my rules extract messages) and I have some sub-folders in them in accordance to the domain.
It's impossible in scripts to access to that sub-folders.

tell application "Mail"
activate
set mbox to "nubian/scripting"
set sel to missing value
tell mailbox mbox
set msgs to every message whose read status is false
if ((count of msgs) is greater than 0) then set sel to item 1 of msgs
end tell
if (exists sel) then open sel
end tell


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@


 _______________________________________________
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: Mail scripting…
      • From: Philip Aker <email@hidden>
    • Re: Mail scripting…
      • From: Axel Luttgens <email@hidden>
    • Re: Mail scripting…
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: OT: Airport on Leopard
  • Next by Date: Scripting Sound Control Panel
  • Previous by thread: Re: Address Book stops indexing after editing Notes field w/ Applescript?
  • Next by thread: Re: Mail scripting…
  • Index(es):
    • Date
    • Thread