Script Editor problem in 10.2
Script Editor problem in 10.2
- Subject: Script Editor problem in 10.2
- From: Cornwall <email@hidden>
- Date: Sun, 8 Sep 2002 10:43:52 -0700
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.
tell application "Eudora"
set thisStyledTxt to the clipboard as string
end tell
set clipRecord to thisStyledTxt as record
set theTxt to <<class ktxt>> of clipRecord
set AppleScript's text item delimiters to tab
set txtLst to theTxt's text items
set AppleScript's text item delimiters to " "
set theTxt to txtLst as text
set AppleScript's text item delimiters to "<=" --less than or equal to
set txtLst to theTxt's text items
set AppleScript's text item delimiters to "<="
set theTxt to txtLst as text
set AppleScript's text item delimiters to ">=" --greater than or equal to
set txtLst to theTxt's text items
set AppleScript's text item delimiters to ">="
set theTxt to txtLst as text
set AppleScript's text item delimiters to "/=" --not equal to
set txtLst to theTxt's text items
set AppleScript's text item delimiters to "/="
set theTxt to txtLst as text
set AppleScript's text item delimiters to "[Break]" --option L
set txtLst to theTxt's text items
set AppleScript's text item delimiters to "[Break]"
set theTxt to txtLst as text
set AppleScript's text item delimiters to "<<" --char 199
set txtLst to theTxt's text items
set AppleScript's text item delimiters to "<<"
set theTxt to txtLst as text
set AppleScript's text item delimiters to ">>" --char 200
set txtLst to theTxt's text items
set AppleScript's text item delimiters to ">>"
set theTxt to txtLst as text
set AppleScript's text item delimiters to {""}
if "<<" is in theTxt then
set theTxt to theTxt & return & return & "-- \"<<\" and \">>\" represent ASCII 199 and 200."
end if
if "[Break]" is in theTxt then
set theTxt to theTxt & return & "-- \"[Break]\" is 'option-L', the continuation character (gotten when continuing a line by typing 'option-return')."
end if
tell application "Eudora" to set the clipboard to theTxt
Corny
_______________________________________________
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.