3 ms·
As jitl mentioned, macOS can be scripted also with JS [1]. You can also create GUI in an imperative style. Or write a React reconciler and have something like R
by mlajtos 4y ago
As jitl mentioned, macOS can be scripted also with JS [1]. You can also create GUI in an imperative style. Or write a React reconciler and have something like React Native via JXA, without any ObjC bridge. Not that you should do it, but its possible.
https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/Introduction.html#//apple_ref/doc/uid/TP40014508 https://developer.apple.com/library/archive/releasenotes/Int...
- hhas 4y agoIf you really want to script macOS apps using JavaScript, try nodeautomation: https://www.npmjs.com/package/nodeautomation https://www.npmjs.com/package/nodeautomation JXA is buggy and crippled, with abysmal documentation and zero community or official support. nodeautomation is provided without warranty or [unpaid] support, but at least it works right and I will keep maintaining it for as long as I use it myself (maybe 3-5 years, as it’s part of my AppleScript-to-UXP migration toolkit for Adobe CC scripters). If you can run[1] the ASDictionary and ASTranslate support apps they answer 95% of “How do I…?” questions for you. That all said, you really are best sticking to AppleScript. The language sucks and its community moribund, but at least there are people there who understand how to use it with the various “AppleScriptable” apps who can help you when you get stuck. -- [1] Both apps are written in Python3 and py2app, and I haven’t bothered to codesign those releases (it’s a chore) so M1/M2 Macs will probably refuse to run them. (If anyone really cares, they can jump up and down on me to do so or, even better, codesign them for me so I can just post those builds.)