On 12 Oct 2020, at 13:30, Greg Raven <[email protected]> wrote:

> Thanks for supplying this final piece. Trying to learn AppleScript by reading 
> the dictionaries is much like trying to learn a foreign language just from 
> reading a bilingual dictionary for that language. Why Apple decided not to 
> include any code samples in AppleScript dictionaries is beyond me.

Here’s another way to do it:

tell application "Safari" to set _src to source of front document
tell application "BBEdit"
        activate
        set _doc to make document with properties {text:_src, linebreaks:Unix}
        tell _doc
                format mode gentle hierarchical with normalizing tag case
                set _t to time of (current date)
                set _f to (path to desktop as string) & _t & ".html"
                save to file _f
        end tell
end tell

-- 
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/7EC6147E-0E0E-456A-BFD8-B9894C81364E%40gmail.com.

Reply via email to