> 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/66EFA0DB-CCBC-4888-8939-4EB6C076247A%40gmail.com.

Reply via email to