• 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: problem with a mail.app script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with a mail.app script


  • Subject: Re: problem with a mail.app script
  • From: BJ Terry <email@hidden>
  • Date: Sun, 11 Apr 2004 12:53:04 -0700

On Apr 10, 2004, at 4:16 PM, Kim Holburn wrote:

I am trying to write a mail.app rule script that opens a new window when I get mail moved to a mailbox.

None of these do anything. I get a new message viewer window but the script can never select a mailbox. Anyone have any hints?


--
Kim Holburn

On my computer, if I run the following script:

tell application "Mail"
set theWindow to make new message viewer with properties {visible:true}
set selected mailboxes of theWindow to {mailbox "myMailbox"}
end tell

It won't select the mailbox. But if I add a delay of 1 second before setting the mailbox, like so:

tell application "Mail"
set theWindow to make new message viewer with properties {visible:true}
delay 1
set selected mailboxes of theWindow to {mailbox "cal_acacia_spring04"}
end tell

it works fine. The window isn't really ready to receive a new selection when it first opens, you just have to give it a second.

BJ Terry
_______________________________________________
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: problem with a mail.app script
      • From: Kim Holburn <email@hidden>
    • Re: problem with a mail.app script
      • From: Kim Holburn <email@hidden>
References: 
 >problem with a mail.app script (From: Kim Holburn <email@hidden>)

  • Prev by Date: Re: can't make option down into a real
  • Next by Date: Re: (2 of 2) Application Scripting Question - Theoretical? (was Re: Technote 2106 is da Bomb)
  • Previous by thread: problem with a mail.app script
  • Next by thread: Re: problem with a mail.app script
  • Index(es):
    • Date
    • Thread