Hi,
thanks for answering.
I'm trying to script an operation.
Actually, browsing the documentation and looking at other examples I've got
to something that does the trick:
*tell* *application* "BBEdit"
*tell* selection *of* *front* *text window*
*replace* "<p" options {starting at top:*true*, search mode:*grep*} using
"<p class=\"i-plomo-2\"></p> <p"
*end* *tell*
*end* *tell*
I then trigger this with a keyboard shortcut, which is what i need.
Now, your question leaves me wondering: Could one assign a keyboard
shorcut to a saved search-replace pattern ?
Best!
p
El martes, 23 de junio de 2020, 15:37:29 (UTC+2), Rich Siegel escribió:
>
> On 6/23/20 at 6:40 AM, [email protected] <javascript:> (Pablo Nolla)
> wrote:
>
> >I'm not familiar with scripting, so please forget me if the
> >question is too basic or out of scope.
> >
> >I would need to learn how to automate a simple search-replace
> >(eventually with greps) grep that would run only on the
> >selected text of the front BBEdit window.
>
> Are you specifically trying to learn how to script an operation?
> Or do you simply want to perform a "Replace All in Selection"
> with a keyboard equivalent?
>
> R.
> --
> Rich Siegel Bare Bones Software, Inc.
> <[email protected] <javascript:>> <
> https://www.barebones.com/>
>
> Someday I'll look back on all this and laugh... until they
> sedate me.
>
>
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" rather than
posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/ea17cfcc-7df5-44f6-b814-9fe508b48c0co%40googlegroups.com.