Re: Basic Eudora Question: Make New Mailbox (Applescript-users Digest, Vol 2, Issue 570)
Re: Basic Eudora Question: Make New Mailbox (Applescript-users Digest, Vol 2, Issue 570)
- Subject: Re: Basic Eudora Question: Make New Mailbox (Applescript-users Digest, Vol 2, Issue 570)
- From: Jonathan Levi MD <email@hidden>
- Date: Tue, 30 Aug 2005 08:43:53 -0400
At Mon, 29 Aug 2005 18:35:18 -0500, Christopher
Stone <email@hidden> wrote:
At 01:38 -0400 08/29/2005, Jonathan Levi MD wrought:
>Yes, I was hoping to find a way to make Eudora aware of the new
mailbox if the latter is created while Eudora is running. I'm
already doing this with GUI-scripting, but was hoping to find a way
to do it without, as it would probably be more robust.
Seems to me that was JD's "Eudora mailbox challenge" a couple of
years ago. I don't have the solution I came up with handy at the
moment, so this will have to do:
try
set newMailboxName to "testMailbox"
set homeFolder to path to home folder
tell application "Eudora"
set euF to file of mailbox 1
end tell
tell application "Finder"
set euMailFolder to parent of euF
set newMailbox to make new file at homeFolder with properties ¨
{name:newMailboxName, file type:"TEXT", creator type:"CSOm"}
open newMailbox
end tell
delay 0.5
tell application "Eudora"
close window newMailboxName
end tell
tell application "Finder"
move newMailbox to euMailFolder with replacing
end tell
tell application "Eudora"
open mailbox newMailboxName
set bounds of window newMailboxName to {0, 44, 911, 769}
end tell
on error errMsg number errNum from errFrom partial result errResult to errTo
set msg to errMsg & return & return & "Number: " & errNum
beep
display dialog msg with icon 0 giving up after 60
end try
At the time I mentioned this is an inelegant solution, but it *does* work.
The script is tested only on Tiger, and I've not provided any error
checking for existing mailboxes.
Bravo! It worked in Panther too, One change was required: in the line
set newMailbox to make new file at homeFolder with properties ¨
the final "¨" has to be changed to "¬"
I will study your script, to see what is critical
to making Eudora recognize the new mailbox.
Many thanks,
Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden