Hi Chris, 

 Since the end goal was to get the text so I could hard wrap it by removing 
all line breaks first. Is there any easy way to add an additional hard wrap 
on all open documents to the above script? Or is it possible to alter it so 
I could run hard wrap on all open documents as a second operation? Well 
beyond my understanding so really appreciate what you whipped up there.

With respect, David
On Sunday, August 22, 2021 at 3:04:45 PM UTC-7 [email protected] wrote:

> On Aug 21, 2021, at 20:07, David J <[email protected]> wrote:
>
>
> If I have multiple files open, can I remove line breaks from them all at 
> once? I've selected all open documents that are in the side tabs, but the 
> remove line breaks option is greyed out. 
>
> ------------------------------
>
> Hey David,
>
> You can do something like this:
>
> --------------------------------------------------------
> # Auth: Christopher Stone
> # dCre: 2021/08/22 16:43
> # dMod: 2021/08/22 16:43 
> # Appl: BBEdit
> # Task: Remove Line Breaks from Text Documents of Project Window 1.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @BBEdit, @Remove, @Line, @Breaks, @Project, 
> @Window
> --------------------------------------------------------
>
> *tell* *application* "BBEdit"
>
>     
>     *set* docList *to* *text documents* *of* *project window* 1
>
>     
>     *repeat* *with* theDoc *in* docList
>         *tell* theDoc's *text* *to* *remove line breaks*
>     *end* *repeat*
>
>     
> *end* *tell*
>
> --------------------------------------------------------
>
> Note that this works only on documents open in the front project window.
>
> The script can be altered to operate on any open document.
>
> --
> Best Regards,
> Chris
>
>
>

-- 
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/fb00ffbc-7e6d-4f64-a893-5f4640937e67n%40googlegroups.com.

Reply via email to