One of the many things I love about BBEdit is its comprehensive AppleScript support. It can be super handy for automating things and well, all the stuff AppleScript is good for.
Ugh, maybe just not AppleScript as the lang choice there?
If AppleScript is what floats your boat, you can always use Node’s Child Process API to shell out to an AppleScript.
“Ugh” Well, yes, AppleScript isn’t my favourite language either, but it’s often only user-accessible option for inter-application automation in Mac OS X. It’s not that you’d script BBEdit with it, but that you’d send a snippet of text from your web browser to a new document via the clipboard, or using Services or automation tools (eg Automator or Keyboard Maestro). AppleScript is still the answer until Apple replace it with something better…
I actually do script it from time-to-time. I have one that alters my apache conf file to simulate shared hosting locally, except instead of multiple instances it’s just one. I could probably do it some other way, but this works.