On Monday, January 22, 2018 at 9:34:40 AM UTC-5, Bernardo wrote:
>
> Thanks for your reply, John.
> Unfortunately, Applescript editor complains about an expected end of line 
> on the word "search" at the first line... I don't know why.
>
>>
>>         *set* PREV_SEARCH_STRING *to* current search strings
>>
>>        *set* PREV_SEARCH_STRING *to* search string *of* 
>> PREV_SEARCH_STRING
>>
>>
>>
Me either. It could be just a weird copy-paste thing. Try typing it in by 
hand, or maybe it's the more recent version of BBEdit? For that, use 
command-shift-O to open BBEdit's dictionary in the script editor and make 
sure those properties are still there. Meanwhile, this works for me:

*tell* *application* "BBEdit"

       *set* PREV_SEARCH_STRING *to* current search strings

       

       *set* PREV_SEARCH_STRING *to* search string *of* PREV_SEARCH_STRING

       

       *set* theChoice *to* *display dialog* "Search current document for:" 
default answer PREV_SEARCH_STRING

       

       *if* button returned *of* theChoice *is* "OK" *then*

               *set* searchOpt *to* {starting at top:*true*}

               *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

               *end* *tell*

       *end* *if*

*end* *tell*


For some reason BBEdit doesn't remember the search string if you change it 
in the dialog.


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to