4 ms·
> The main problem is that AppleScript only appears to be a natural language. In fact [it] is an artificial language, like any other programming language. [E]ve
by cooper12 10y ago
> The main problem is that AppleScript only appears to be a natural language. In fact [it] is an artificial language, like any other programming language. [E]ven small changes to the script may introduce subtle syntactic errors which baffle users. It is easy to read AppleScript, but quite hard to write it."
- AppleScript by William R. Cook (http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf)
My first programming language was Applescript and I have to say I agree. I'd spend most of my time coaxing the language of my code until the compiler could recognize its grammar. (Also, without an external application like UIElementInspector, just forget trying to figure out the incantations to properly manipulate windows and their buttons) The biggest strength of Applescript was the ability to pipe out to the shell for areas it sucked in. There are also a mountain of gotchas that newbies ha ve to watch out for: making sure the application has focus, escaping quotes properly, posix paths vs aliases, data types (text vs integer), and much more. I have to say the best parts of Applescript were the documentation (APIs exposed as "dictionaries" by each scriptable app), and being able to create "native" apps really easily as well as UIs/dialogs. (though with codesigning its utility to beginners is further reduced)