News for hackers. Stuff that matters.
Re:Awesome OS X Command Line by Retr0spectrum on Friday February 17, 2017 @06:22AM (#13667465)
I've never seen AppleScript before, and I'm fascinated by the syntax. Is it as easy to write as it is to read?
Re:Awesome OS X Command Line by provemewrong on Friday February 17, 2017 @08:46AM (#13668198)
No. It's probably the most frustrating syntax I've had the (dis)pleasure of working with.
Re:Awesome OS X Command Line by allenbrunson on Friday February 17, 2017 @11:09AM (#13669231)
Sadly, 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 ...
Re:Awesome OS X Command Line by brazzledazzle on Friday February 17, 2017 @10:02AM (#13668639)
Anything 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.
Re:Awesome OS X Command Line by Sean1708 on Friday February 17, 2017 @08:09AM (#13668009)
It'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.
Re:Awesome OS X Command Line by otterpro on Friday February 17, 2017 @10:17AM (#13668740)
You can now write in Javascript instead of Applescript (https://developer.apple.com/library/content/documentation/La...). For examples of Applescript equivalent code in Javascript, see 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.
Re:Awesome OS X Command Line by TheAceOfHearts on Saturday February 18, 2017 @11:59AM (#13675489)
My 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.
Re:Awesome OS X Command Line by shizzy0 on Saturday February 18, 2017 @12:23AM (#13673722)
Unfortunately if you know English, the doors to truly learning AppleScript are forever closed to you.