File Paths

Here are some official words from developer.apple.com: Aliases and Files   The following is the recommended usage: Use an alias object to refer to existing file system objects. Use a file object to refer to a file that does not yet exist. Use a POSIX file specifier if you want to specify the file using […]

Comments

As you write scripts, a best practice is to leave yourself or others little notes on what you are doing and why. These are called comments. The script does not read comments, the script editor grays out all comments so they are easily differentiated from the script. They are extremely helpful when trying to make […]

Finder: Create a New Folder

Make a new folder on the desktop with the name “My Folder”. tell application “Finder” make new folder at (path to desktop) with properties {name:”My Folder”} end tell Another way to make a new folder on the desktop with the name “My Folder”. Of course you will need to change the path (“SDD:Users:Michelle:Desktop:”) to fit […]

Controlling Applications

You can control multiple applications (including Finder) in one applescript. Each command to control an application must be wrapped in a tell/end tell statement. Start by typing tell application and then type the name of the application in double quotes. Always use double quotes with variables and tell statements. If applescript isn’t quite sure which […]

What is a Variable?

set my_message to “hello world” say my_message What is a Variable? In the above code, my_message is the name of the variable. “hello world” is the information the variable holds. After you define the variable, every time you use the variable in the code, the script will replace the variable with the information that the variable holds. […]

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 […]

Intro to Applescript

Let’s Get Started ▸Navigate to the Applications/Utilities folder (Cmd Shift + U) and open the application Script Editor. ▸Take a look at the elements. Hover over buttons to read what they are for. Try turning on (icon will turn blue) the Show or Hide the Log icon at the bottom of the application. This feature […]

What can applescript do for you?

What is applescript anyway? What does it do and how can it help me? First things, first. Applescript is for macs. If you don’t use one, you can still try to automate with javascript. Javascript is great because it is not limited to one platform. However, it is not the easiest language to learn and […]