It's a shame that Open Scripting Architecture has languished. It let you write scripts to extend and connect applications on your Mac in very powerful ways, in any OSA language you choose (including Javascript).<p>Unfortunately AppleScript was the default language, has always been terrible (IMHO), and became more so with OS X. Apple Events took a serious backseat with OS X as well, making it difficult to implement in your app.