find "<title>" searching in text 1 of text window 1 options {search mode:grep, starting at top:true, wrap around:true, returning results:true} with selecting match
search mode (literal/grep) : the type of search (literal search if omitted)
starting at top (boolean) : start from the top of the document? (false if omitted)
wrap around (boolean) : should the search wrap from the end of the document? (false if omitted)
backwards (boolean) : should the search proceed backwards? (false if omitted)
case sensitive (boolean) : should the search be case-sensitive? (false if omitted)
match words (boolean) : should the search only find whole words? (false if omitted)
extend selection (boolean) : should the selection range include the original selection start through the end of the match? (false if omitted)
returning results (boolean) : if performing a batch or multi-file search, return a list of matches? (false if omitted)
showing results (boolean) : if performing a batch or multi-file search, open the list of results? (true if omitted)
HTH
Jean Jourdain
tell application "BBEdit"
set result to find "<title>" searching in text of first window options {starting at top:true}
end tell
Result:{found:true, found object:characters 74 thru 80 of text document 1 of application "BBEdit", found text:"<title>"}
set result to (find "<title>" searching in ¬(alias "full HFS path to my file") ¬
options {starting at top:true} with selecting match)
if (found of result) then .....Script debugger tells me, for the last lineVariable result is undefined.If I execute with option returning results, the variable is defined but its structure does not correspond with what the script given in the manual for the replacement part expects as structure...