Re: Basic Eudora Question: Make New Mailbox
Re: Basic Eudora Question: Make New Mailbox
- Subject: Re: Basic Eudora Question: Make New Mailbox
- From: Christopher Stone <email@hidden>
- Date: Mon, 29 Aug 2005 18:35:18 -0500
At 01:38 -0400 08/29/2005, Jonathan Levi MD wrought:
Charles Buckett's and Bill Briggs's replies much appreciated. (Gee,
the script by JD from the archives, provided by Charles, had me
peering into Eudora's 'aete' resource to see what «class euFS» is.)
:)
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.
Chris
_______________________________________________
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