Re: Script to insert SE2 script in Eudora message
Re: Script to insert SE2 script in Eudora message
- Subject: Re: Script to insert SE2 script in Eudora message
- From: Emmanuel <email@hidden>
- Date: Thu, 6 Mar 2003 19:06:22 +0100
At 4:19 PM +0000 06/03/03, John Delacour wrote:
if s is "" then return beep
Two comments:
1. I think that "return beep" may be unsafe under OSX. I don't know
why nor when , but this construction crashes. I loved returning beep
but now I advise to write 4 lines: "if ... end/beep/return/end if"
(or 2, see below).
2. It is not safe to compare s to "". This will fail if s is longer
than 32 KB. One should rather write:
---------------------
if s's length is 0 then ...
---------------------
You can modify it to get just the selection or to insert into an
inferior mailer.
I don't have an inferior mailer, but I have a superior mailer, and I
could modify your script for it.
This script takes the whole contents of Smile's front (text or
script) window and pastes it at the insertion point in Eudora's front
(text or message) window.
--------------------- autotested !!!
tell application "Smile"
set s to text of window 1
if s's length is 0 then beep
if s's length is 0 then return
set s to change tab into " " in s
end tell
tell application "Eudora"
set the selected text to s
end tell
---------------------
Emmanuel
PS
Now, if you have an inferior mailer, you may want to try to get "text
of window 1 as styled text". Unless I'm missing something Eudora
seems to care little about styled text.
_______________________________________________
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.