4 ms·
I've never seen AppleScript before, and I'm fascinated by the syntax. Is it as easy to write as it is to read?
by Retr0spectrum 10y ago
I've never seen AppleScript before, and I'm fascinated by the syntax. Is it as easy to write as it is to read?
- Sean1708 10y agoIt's been a little while since I last wrote any AppleScript but while I didn't find it completely horrendous to write, it was certainly harder to write than most scripting languages because there is a lot to remember about how a script can and can't be structured.
- provemewrong 10y agoNo. It's probably the most frustrating syntax I've had the (dis)pleasure of working with.
- allenbrunson 10y agoSadly, I have to agree. The first time you see an AppleScript, you think, wow, that looks great, can't wait to dive in. Two hours later, still can't get the simplest little things to work, start wondering if maybe I can do this with a bash script, or something else ...
- brazzledazzle 10y agoAnything remotely complex is weird and unintuitive. I've had the displeasure of writing AppleScript as both a novice and intermediate scripter/programmer. The latter is much more frustrating because instead of just the "natural language"(for lack of a better term) falling apart you are now very much aware of what it's lacking.
- otterpro 10y agoYou can now write in Javascript instead of Applescript (https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ https://developer.apple.com/library/content/documentation/La...). For examples of Applescript equivalent code in Javascript, see https://github.com/dtinth/JXA-Cookbook https://github.com/dtinth/JXA-Cookbook. Yes, Applescript looks horrible, but it was originally designed for non-programmers, so it had very verbose English-like syntax.
- shizzy0 10y agoUnfortunately if you know English, the doors to truly learning AppleScript are forever closed to you.
- TheAceOfHearts 10y agoMy experience has been that it's pretty frustrating after a few minutes. It's a dead language with very few references available online. Apple recently added support for using JavaScript wherever you'd use AppleScript, and it wouldn't surprise me if they end up killing it off completely in a few years.