Re: Script Editor problem in 10.2
Re: Script Editor problem in 10.2
- Subject: Re: Script Editor problem in 10.2
- From: John Delacour <email@hidden>
- Date: Sun, 8 Sep 2002 19:51:33 +0100
At 10:43 am -0700 8/9/02, Cornwall wrote:
The following script (which needs to be changed back to its original
form from that which I'm able post through the mail server) will not
run from Eudora's Script menu if it is saved from Script Editor. It
either crashes Eudora or does nothing. The same exact script, saved
from Smile, works fine every time it is run from the Eudora Scripts
menu.
The script's purpose is to replace non transmissible characters in
scripts that I post to this list.
I don't know if this is connected to other reported problems with
Script Editor, but it acts like a bug.
It is more likely that your use of the clipboard is causing the
trouble. For one thing you have neglected the golden rule to avoid
putting statements in a tell block if it's not necessary and for
another you don't need to use the clipboard because Eudora will give
you 'selected text' or 'body' or 'field ""' or 'whole text' already
converted to text.
Why are you using styled text anyway? You can easily remove any
styling you have pasted into the message by typing cmd-opt-at, whihc
is quicker than any script.
See how this script works for you when you have undone the damage in
the second line:
tell app "Eudora" to set s to field "" of message ""
set ls1 to characters of "+;,>" -- thanks, list administrator
set ls2 to paragraphs of "<<\r>>\r_|\r<=\r>="
repeat with i from 1 to count ls1
set {x, y} to {item i of ls1, item i of ls2}
set AppleScript's text item delimiters to {x}
set ls to text items of s
set AppleScript's text item delimiters to {y}
set s to ls as string
end repeat
set AppleScript's text item delimiters to {""}
tell app "Eudora" to set field "" of message "" to s
JD
_______________________________________________
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.