Re: problem with a mail.app script
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.