Thanks John.
This version works :)

property startAtTop : true
property wrapAround : false
property caseSensitive : false
property matchWords : false
-----------------------------------------------------------------------------

tell application "BBEdit"
    --------------------------------- set prev search string
    set prevSearchString to current search strings
    try -- prev search string not always exists
        set prevSearchString to search string of prevSearchString
    on error
        set prevSearchString to ""
    end try
    -------------------------------- perform search
    set theChoice to display dialog "Search current document for:" default 
answer prevSearchString
    if button returned of theChoice is "OK" then
        set searchOpt to {starting at top:startAtTop, wrap around:wrapAround
, backwards:false, case sensitive:caseSensitive, match words:matchWords}
        tell window 1
            set findRes to find text returned of theChoice options 
searchOpt with selecting match
            if findRes's found is false then beep
            --set search string of current search strings to findRes -- 
seems useless
        end tell
    end if
end tell



-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to