> On Aug 24, 2021, at 10:39, David J <[email protected]> wrote:
> 
> Oh, one last thing. Is there a save all command available after doing this?

Hey David,

AppleScript can do many things...

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/08/22 16:43
# dMod: 2021/08/24 20:30
# Appl: BBEdit
# Task: Remove Line Breaks from Text Documents of Project Window 1.
#     : Then Hard Wrap to the Given Length.
#     : Then save each document.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Remove, @Line, @Breaks, @Project, 
@Window
--------------------------------------------------------
property hardWrapWidth : 70
--------------------------------------------------------

tell application "BBEdit"
    
    set docList to text documents of project window 1
    
    repeat with theDoc in docList
        tell theDoc
            tell its text
                remove line breaks
                hard wrap width hardWrapWidth
            end tell
            save
        end tell
    end repeat
    
end tell

--------------------------------------------------------


--
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/D04E9094-968A-45F7-B2FE-15148A630DB8%40gmail.com.

Reply via email to