Fun with Eudora & AppleScript
Fun with Eudora & AppleScript
- Subject: Fun with Eudora & AppleScript
- From: David Crowe <email@hidden>
- Date: Sat, 22 Jun 2002 23:27:51 -0600
I have been playing with an AppleScript (embedded in QuickKeys) to
try to do the simple job of attaching files selected in the Finder to
a Eudora email message.
The following works.
The repeat loop is necessary because Eudora won't accept a true alias
list, as far as I can tell, it insists on alias lists with one file
alias at a time.
The 'on error' is executed when a single item is selected. This
creates an alias list with one element. The normal path creates a
list of document files (not a list of aliases), even though it is
coerced to alias list.
Consequently, saying "Open TheSelection" doesn't work.
I'm not sure how much of this is idiosyncracies of the Finder and how
much idiosyncracies of Eudora. But, if anyone can clarify
Thanks to email@hidden and email@hidden who gave me some
previous help with the Finder idiosyncracies. Your suggestions
helped, but it seems that Eudora has some additional quirks.
If anyone can explain this, or perhaps suggest a simpler script (that
actually has been tested with Eudora), I would appreciate it.
Anyway, I'm happy now.
- David Crowe
-- Attach selected files to outgoing Eudora message (either topmost
message, if applicable, or a newly created message if topmost message
is not an outgoing email)
tell application "Finder"
try
set TheSelection to (the selection as alias list)
on error
set TheSelection to {the selection as alias}
end try
end tell
tell application "Eudora"
activate
repeat with AnItem in TheSelection
open {AnItem as alias}
end repeat
end tell
_______________________________________________
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.