AppleScripting a BBEdit Find...

50 views
Skip to first unread message

Christian Boyce

unread,
Aug 29, 2023, 11:55:29 PM8/29/23
to BBEdit Talk
I have a simple Find in a BBEdit AppleScript. It looks like this:

set myList to find "^DESC!([A-Z]*[0-9]*)\\t(INT\\.|EXT\\.{1})(.*)$" searching in text 1 of text of myDoc options {search mode:grep, starting at top:true, returning results:true}



The very last part of this statement, where it says “returning results:true” is important because I need the list of what is found (I later step through the list of found items). 


If I say “returning results: false” I don’t get the list of found items, so I can’t step through them later. I have to have “returning results: true”. 


But… if it happens that NOTHING is found, which is bound to happen, then I get a little notification from BBEdit saying “Multi-File Search Completed. The pattern "^DESC!([A-Z]*[0-9]*)\t(INT\.|EXT\.{1})(.*)$” was not found.”


I would rather not see that little notification. Is there a way, in AppleScript, to tell that notification to not appear?


Thank you--

Reply all
Reply to author
Forward
0 new messages