On Jan 13, 2010, at 3:55 PM, Bull wrote:

> The AppleScript log shows, after the successful search, the result '--
>> {found:true, found object:characters 154 thru 158 of text document
> 1, found text:"abcde"}'.
> 
> "abcde" is the text that I want to use for my string. But, for
> example, "get (found text)" results in 'error "BBEdit got an error:
> Can’t make found text into type found text." number -1700 from found
> text'. Different attempts to refer to "found text" get different
> errors.

It is usually useful to show us what you tried, so we can show you how you went 
wrong without guessing.

get (found text) is meaningless in this context.

The find verb returns you a record, and you access the found text field of that 
record.

For example:

tell application "BBEdit"
        tell text window 1
                set theFindResult to find "foobar"
                if found of theFindResult then
                        set s to found text of theFindResult
                        display alert s
                end if
        end tell
end tell


- Jim
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.

Reply via email to