This looks slick, but it doesn't run for me. I get an error on save, and the (path to desktop as string) seems not to resolve to anything.
On Monday, October 12, 2020 at 6:26:32 AM UTC-7 John R M. Delacour wrote: > > > 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/f5351ec9-12ea-4f8d-9565-1180634e095an%40googlegroups.com.
