Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Oneechan69

macrumors 6502
Original poster
Mar 29, 2022
251
29
US
Without looking deep into it, Hammerspoon is a way to automate things in macOS with Lua, but the website doesn't mention why it would work better than AppleScript or JavaScript. What would make this 3rd party app more compelling than these 1st party solutions?
 

MikeDr206

macrumors 6502
Oct 9, 2021
496
334
Hammerspoon looks interesting tbh. I’ve always liked Lua. AppleScript is a PITA with its conventions, and I don’t know JavaScript.

I can’t imagine needing Hammerspoon if you already know JavaScript, but it’s more compelling than AppleScript for sure since AS is so unwieldy
 

gilby101

macrumors 68030
Mar 17, 2010
2,888
1,599
Tasmania
Hammerspoon is a way to automate things in macOS with Lua, but the website doesn't mention why it would work better than AppleScript or JavaScript
Not better, just different. There are multiple tools to automate macOS and applications. There is overlap, but no one tool that does everything and all tools bring some compelling features and specific strengths.

It is hard to automate on a Mac without at some point needing AppleScript (and shell scripting). This is because AppleScript is the direct way of interacting with apps which present/publish an AppleScript interface - it is the glue that allows connection between an automation tool and an app. I note that Hammerspoon has an API for calling AppleScript.

I don't have experience with Hammerspoon though I considered it before deciding that KeyboardMaestro was more suited to my style and tastes.

JavaScript (as exposed by the Script Editor) gives access to the same functionality as AppleScript, it doesn't bring anything different except for the language.
 
  • Like
Reactions: gregmac19
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.