John Mosby how do I search through text without finding text from previous search
Nov 07, 2008; 21:14
John Mosby
how do I search through text without finding text from previous search
I want to search a window of text, but I don't want to continue to find the same text that I previously found. How do I do that? I have tried to set the insertion point after the found text block, but I can't make that work. The script is posted below. Thanks for any help, I'm sure this isn't that hard I just haven't figured it out.
tell application "BBEdit 6.5" make new document set selection of text window 1 to page_source set searchStr to "Position: [\\d]+:[\\d]+:[\\d]+ Score: [\\d]+" set do_again to true select insertion point before first line of text window 1 repeat while do_again set zFindResult to find searchStr options {search mode:grep, returning results:true, starting at top:false, showing results:false} searching in text 1 of text window 1
-- the line below is a problem. the script seems to constantly keep finding the same string select insertion point after selection of text window 1
--if found of zFindResult and length of found matches of zFindResult > 0 then if found of zFindResult then set ResultText to found text of zFindResult set selection of text window 2 to ResultText & return & return select insertion point after last line of text window 2
--replace (searchStr as string) using ("" as string) options {search mode:grep, starting at top:true} searching in text 1 of text window 1
else set do_again to false display dialog "done" close window 1 saving no end if end repeat
end tell
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Nov 09
John Mosby Re: how do I search through text without finding text from previous search
Nov 09, 2008; 09:09
John Mosby
Re: how do I search through text without finding text from previous search
Nov 09
John Mosby Re: how do I search through text without finding text from previous search
Nov 09, 2008; 11:11
John Mosby
Re: how do I search through text without finding text from previous search
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!