On Oct 12, 2007, at 14:46, D Masneri wrote:
As I'm new to AppleScript, I don't know how to solve this easy
problem.
I want to search patterns in the text of the front window, do a
few find and replace on the selection, then loop until the end of
file.
The script should look like this:
repeat
find a pattern
do some changes on the selected found result
set cursor position after the last character of the selection
until end of file
The two problems I can't solve are :
1- how to set the cursor to the end of the previous found result
that is still selected ;
2- the loop condition: the previous selection may be several
paragraph long, and the modifications I make on it will often
change the number of it's lines, so I can't use the text initial
line numbers to loop.
Search backwards: the start of your selection will not change that way.
Maarten
--
------------------------------------------------------------------------
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_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>