https://www.reddit.com/r/applescript/comments/bhr67v/how_to_learn_apple_script/


Rikuz7• 5y ago

Official documentation here: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP40000983-CH208-SW1

Discussion forum for when in trouble: https://www.macscripter.net

If you prefer a tactile and conversational feel, this is one of the best books (available in many places): http://shop.oreilly.com/product/9780596102111.do

I recommend putting the mobile devices aside for now and just sticking with the Mac because that’s the environment where the scripts are made and run. Scripting involves lots of typing and agile editing, copying and pasting, as well as viewing the holistic picture and anatomy of a script on a scale that no mobile device’s display is sufficient for.

Whenever I was learning Applescript, especially in the beginning, I was googling constantly. It’s one of the most crucial tools in this area of research too.


brandelune • 5y ago

Just like any programming language, it is relatively easy to start doing things in AppleScript, even more so because you actually work with the apps that you use everyday.

A good starting point is to think of AppleScript as your personal tool making language.

It took me a while to actually find a real use for AppleScript in my daily computer life. I started with big things: automating the job projects creations between Mail/Calendar/Finder, then I did a lot of smaller things, the most recent being creating random emails to register on public Wifi networks. And now I’m reusing code between my big things and doing bigger and more complex things.

So, what you need to do to learn it is first find a concrete project. Any relatively simple task that you do more than 2-3 times a week is a good candidate.

Then you need tools. Right now you can work with Apple’s provided Script Editor, but if you’re serious about your coding, you’ll soon need to move to Script Debugger by Late Night Software.

There are plenty of places on the web where you’ll find AppleScript reference, the most comprehensive is this site: https://applescriptlibrary.wordpress.com

It happens to have a link to one of the most recently available Apple issued AppleScript Language Guide (2013, I have a 2015 version but there are few differences if any). Having a desktop searchable reference is important, get that PDF as soon as you can.

After 10 years of working with AppleScript, I decided to formally learn AppleScript to stop making the same mistakes over and over again. I checked books for that abd bought paper copies of O’Reilly’s Definitive Guide by Neuburg and Apress’ Learn AppleScript by Sanderson and Rosenthal.

The best book I could find to learn AppleScript is not Neuburg’s book. Neuburg’s book is advertised as the best book for newcomers on the back cover, but unless you have a solid background in programming languages you won’t be able to make much use of it. Apress on the other hand has managed to publish a comprehensive book that goes well beyond the basics and is here to teach you, not to focus right from the beginning chapters on the obscure details of variable scope…

That’s for the references you’ll need.

Regarding online communities, the AppleScript User List, hosted by Apple is the watering hole of the most skilled AppleScript programmers in the world. If you’re stuck, just send a message and somebody will help. https://lists.apple.com/mailman/listinfo/applescript-users

Then, the Script Debugger forum is a free access forum that’s much easier to use than MacScripter: https://forum.latenightsw.com/

MacScripter is good, but its user interface is stuck in the 90’s and unless you’re into such online forum you’re really better of with the list above of Script Debugger’s forum (for historical reasons, the same person manages both).

Last but not least, everybody has a story about how they learned AppleScript and what they did with it. I try to document mine on my “Mac for Translator” blog. For ex, this article tries to document how to create simple XML documents https://mac4translators.blogspot.com/2018/02/this-article-is-attempt-at-putting.html

All my AppleScript related articles are here: https://mac4translators.blogspot.com/search/label/AppleScript

Depending on your field of activity the articles may or may not be relevant, because as I wrote at the top, it is important that you find a good reason to learn AppleScript. So first, stick to a small by practical project and then code, create a coding note book where you write down what you learned, what were your mistakes, and code again, check references, and code. Etc.