Re: Eudora mail folders and "" root (JD?)
Re: Eudora mail folders and "" root (JD?)
- Subject: Re: Eudora mail folders and "" root (JD?)
- From: Walter Ian Kaye <email@hidden>
- Date: Sun, 7 Sep 2003 01:59:06 -0700
At 09:25a +0100 09/07/2003, John Delacour didst inscribe upon an
electronic papyrus:
At 9:15 am -0700 6/9/03, Walter Ian Kaye wrote:
With an IMAP mailbox window frontmost, I can do this:
set x to name of window 1
file of mailbox x of mail folder "::IMAP Folder:<<Dominant>>:"
--> file "OSX:Users:boo:Documents:Eudora Folder:IMAP
Folder:<<Dominant>>:Inbox"
But it's still hard to determine that that's where "Inbox" is,
since the reference Eudora gives is bogus. Hard-coding "::IMAP
Folder:<<Dominant>>:" is making a large assumption. (Maybe I can
make it a user preference?)
It's not clear to me just what you need to do and how general you
want your script to be.
I just want to get the mailbox (and its root-y folder) of the
selected message despite Eudora's error (due to its own lie) when the
mailbox is anywhere outside "Mail Folder". As for how general, that
depends on what the possibilities are. For example, a mailbox exists
at the same level as Mail Folder and IMAP Folder (in which case the
error handler should not stop at checking the IMAP Folder but check
outside it too).
Eudora is smart about understanding abbreviated paths passed to it;
the only problem is determining the path when Eudora doesn't want to
give it. :)
(abbr. path: "::IMAP Folder:deeplynestedmailbox")
There are ways, however hackish, to do whatever it is and Eudora can
provide you with all the data -- for example:
tell app "Eudora"
set _nnf to file of nickname file 0
set _imapf to (do shell script "perl -e '
$_ = qq~" & _nnf & "~;s~[^:]+$~~;print'") & setting 11320 & ":"
end
--> "dxp:Users:jd:Documents:Eudora Folder:IMAP Folder:"
Oooh, name of IMAP folder. :D
Do you use the nickname file because "Eudora Folder" is subject to
change? Or is that for some other configurational reason?
tell application "Eudora"
set w to name of window 1 as Unicode text
Is there a good way to handle whether the frontmost window is the
message or the mailbox with the message row selected? I mean when
Eudora is erroring due to mailbox location (it's easier when Eudora
tells the truth, of course).
if setting 32628 is not "%p (%p)" then return beep
That must be a post-5.1 setting...
set ls to do shell script "perl -e '$s =qq~" & w & "~;
@ls = split /\\(/, $s;
for (@ls) {chop} ; print join $/, @ls ;'"
set {_mbx, _personality} to paragraphs of ls
try
name of personality _personality
on error
return "Not an IMAP mailbox"
end try
{_mbx, _personality}
end tell
etc.
I'm not sure what all that's about?
But what's needed is for the aete to be enhanced to do the thing properly.
Eudora shouldn't lie, true. ;)
thanks,
-Walter
_______________________________________________
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.