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

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

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