@estockly: “This all sounded very familiar…”
Heh. I have long since lost count of the skilled knowledgable programmers who go “Hold on a minute lads, I’ve got a great idea.”—only to prove that their greatest idea in the world isn’t worth squit when five minutes’ spent on due diligence would have told them it’s wrong. So when I say “this is very old news”, I mean two decades old!
-
Appscript is still here, and it had solved the entire problem—correctly—by 2006.[1] The Python3 version definitely still works: there’s a maintainer who keeps the PyPI packages up to date and I still depend on py3-appscript in my own automations (for now).
-
The original Ruby rb-appscript is defunct, although there was a third-party fork (rb-scpt) which carried it on.
-
While objc-appscript was atrocious code even by my standards and rightly long-dead, the SwiftAutomation framework that followed it was both >99.9% competent at speaking Apple events and remarkably pleasant in gluing AE’s loosey-goosey and Swift’s “no soup for you!” wildly disparate type systems together. SA’s actually a very nice bridge. (Although I’ve not used it for several years, so no surprises if Apple has broken it since.)
-
Lastly, there’s nodeautomation which puts appscript-style automation into Node.js. I resurrected (read: largely rewrote) nodeautomation at the start of this year for use in my automated AppleScript-to-JavaScript code translator + migration strategy, for Adobe CC automators who wish to start migrating their existing AppleScript investment over to UXP in the next few years. So that one, while it’s a bit duct-tapey, works too, and will continue to work for as long as I offer AS-to-UXP migration services (hopefully next 3–5 years, Apple- and Adobe-willing).
And that’s not counting all the other first- and third-party AE bridges over the last 30 years, of which there are at least a dozen including Apple’s own efforts. The only three(!) AE bridges that ever worked right were Frontier’s, AppleScript’s, and appscript (including its descendents). Although Mac::Glue may be acknowledged for giving it half-decent crack. All the rest were thoroughly technically unfit for purpose; never mind capturing a market share worth a damn, or even any users at all. (This includes Mark’s own well-intentioned JavaScriptOSA, for anyone curious.)
…
Anyway, I’ve done SKaplan the solid [2] of pointing out that he’s done it completely wrong and is utterly wasting his time. Whether or not he takes that as constructive feedback or bruised ego is up to him, but to everyone else: Do not waste your time on PyXA. It’s built on Scripting Bridge, and Scripting Bridge can’t automate itself out of a paper bag, never mind be a competent or even credible alternative to AppleScript.
HTH
[1] Right before the Mac Automation team’s Scripting Bridge and JXA deliberately went and unsolved it again, cratering Mac Automation’s future for good.
[2] If I sound a tad… pithy, consider that I have, in 20 years, attempted every possible approach, including being super-sweet and helpful, absolutely nice as pie, and none of them worked either. So this is definitely a “them” problem, not merely a “me” problem. So I find it quickest just to be me, blunt as rocks, as this quickly eliminates arrogant unreachable dolts who think they know better. Also ’cos dumping 10,000 hours of my own life into this stuff, plus hundreds of hours of other peoples’ too, just to see it all wasted does make me salty. (So anyone who wishes to talk, please DM so we can go off-list and save everyone else’s eyeballs.)