I have to create a printable file out of email newsletters I receive
regularly. I thought I could record an AppleScript. I copied the
mail, then opened BBEdit and started recording. When I finished I
tried to see if it worked but I got the following message:
A scripting error has occurred: BBEdit got an error: The selection
range must be non-empty before attempting a cut or copy.
The script is as follows:
tell application "BBEdit"
activate
make new text document with properties {contents:current clipboard}
remove line breaks text 1 of text document 1
replace "\\r\\r" using "\\r" searching in text 1 of text document 1
options {search mode:literal, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match
words:false, extend selection:false}
copy selection
replace "**************************" using "\
\r**************************\\r" searching in text 1 of text document
1 options {search mode:literal, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match
words:false, extend selection:false}
end tell
What mistake am I doing?
Thank you.
mario
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>