Applescript or Javascript

Why learn applescript instead of javascript?

This blog is a learning guide centering around teaching applescript to those who want to learn to program photoshop and illustrator. I am assuming that you are a designer looking to save time, not a programmer looking to get another language under your belt. Of course anyone is free to learn from my posts.

Applescript is based on the English language which makes it readable and a lot easier to learn. If you are a programmer, you probably already know at least the basics of javascript or can learn it easily enough. If you are a designer, just looking to automate some tasks or create an efficient workflow, then applescript is ideal for you.

The perks of learning javascript are that it is multi platform and a common coding language. Your scripts will work on macs and pc’s. It is also widely used. If you learn and enjoy it, you can use it for other things like web development. With applescript your programs will only work on macs, limiting the usability if you also use a windows based station.

Javascript is limited to working within one program (for example, photoshop). You have to have photoshop open and run the script inside of photoshop and then it does some things within photoshop. This is great for simple tasks. If you are already familiar with coding and are just looking to do simple tasks then javascript may be for you.

Applescript can do a lot more than javascript in relation to adobe products. Applescript can ‘take over’ a wide variety of programs. You can create a new folder in finder, create a new document in illustrator, add some shapes, save it to that new folder, open it in photoshop, change the color mode, scale it, insert into a template and save it as a jpg – all within one script. You can extract data from text files or excel documents and then insert the information into Illustrator (or photoshop, or inDesign – ETC!)

Full disclaimer: I don’t know javascript! If you are unsure about which language to learn, you should do some research first.

I found applescript (although frustrating at times) easy to learn as my first programming language. I could find simple scripts online and modify them through trial and error until I got them to work. I learned by googling whatever I was trying to do. Whenever I came across more complex things I didn’t understand, I would google those too. I have tried doing a few things with javascript. Sometimes you have to use JS within applescript(AS) because it(AS) does have it’s limitations. JS is much harder to figure out – it is not intuitive at all for me.

There are plenty of resources out there on learning applescript but none are devoted to learning in a design environment. I wanted to create this blog to help others in my shoes. It is also a way for me to put all the little lines of code (snippets) in one place to provide easy access for myself! It isn’t necessary to memorize the proper syntax for every function within every program. The common tasks can be found through google in seconds, but there are some that can be hard to find, and frustrating when you’ve used it before but can’t find it again or remember which program you used it in.

I hope you find this guide useful. Please comment and let me know! I’d love to hear from you, so leave your feedback, requests, suggestions or just say Hi.

Back to the Learning Guide

Add your comment

Your email address will not be published. Required fields are marked *