MacTech AppleScript Essentials Column > Performing Basic Image Manipulation… Using Your Existing Software

March, 2005 - Performing Basic Image Manipulation... Using Your Existing Software.

This month, we're going to talk about performing some basic image manipulations with AppleScript. With the onset of the digital camera revolution comes a new set of problems for the computer user. The first thing many people realize after purchasing a digital camera is that film is essentially free, as is developing. You can take as many pictures as you like, just as long as you have ample hard drive space to store them.

While this concept seems amazing at first, you quickly realize that you now have thousands and thousands of image files to deal with. Those image files need to be downloaded, imported, renamed, filed, rotated, cropped, converted to other formats, and more! Sure, there are some tools that Apple gives us to help with these tasks, such as Image Capture and iPhoto. There are also a slew of other applications that you can download or purchase to aid with processing. However, wouldn't it be great if you could slap a few lines of code together to write your own application in order to help with your unique process? Well, using AppleScript, you can.

AppleScript is the perfect tool for automating many image-related tasks. As we have discussed in previous articles, AppleScript can be used to batch-rename files and folders. So, you could create a script that downloads your digital images into a custom folder structure and renames the images with the current date. You could create a script that opens up a folder of images in something like Photoshop and adds copyright information into the images' metadata. The possibilities are virtually limitless.

For this particular article, we're going to focus on performing some basic image manipulations, such as cropping, rotating, and resizing. We'll also look at ways you can convert your images to other formats, such as from JPEG to TIFF, and vice versa. Since AppleScript alone cannot manipulate images, you may be asking how will we do this? Using a background application named Image Events, which comes installed with Mac OS X, version 10.3 and higher, we can perform these tasks. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > An Introduction to Handlers

February, 2005 - An Introduction to Handlers.

In a previous article, you may remember that we discussed methods of writing AppleScripts to watch folders for incoming items to process. In each of the methods we discussed, we made use of handlers. This month, we are going to explore handlers in more depth. Since handlers are a fairly complex subject, the full scope of handlers will not be covered in this month's article. Rather, we will cover the basics of handlers. In future articles, we will discuss handlers in more detail. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > Thinking Logically (Using If/Then Statements)

January, 2005 - Thinking Logically (Using If/Then Statements).

Last month, we explored adding different types of repeat loops to scripts, which is a very important and useful aspect of AppleScript development. As we discussed, by allowing you to perform a series of repetitive tasks without the need to duplicate code, repeat loops help to make your code less verbose, more efficient, and easier to change in the future. This month, we will focus on adding logic to your scripts, which is another important part of AppleScript development. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > Should I Repeat Myself? (Using Repeat Loops)

December 2004 - Should I Repeat Myself? (Using Repeat Loops).

For the past couple of months, we have been talking about some basic Finder scripting. Now we are going to switch gears and get back to some basics of AppleScript. In this month's article, we will discuss the various types of repeat loops that you can use when you are scripting. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > More Finder Scripting

November 2004 - More Finder Scripting.

We've taken a look at some basic Finder scripting, including creating, naming, and updating folders. This month, let's expand a bit further, and begin looking at some other scriptable Finder functionality. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > Becoming More Efficient Through Folder Watching

October 2004 - Becoming More Efficient Through Folder Watching.

For the past several months, we have explored various aspects of AppleScripting in Mac OS X. We have discussed some basic Finder scripting, adding repeat loops and if/then statements to our scripts, and more. This month, we will explore a topic of frequent interest to those who want to automate various aspects of their workflow - folder watching. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > Introduction to Scripting the Finder

September 2004 - Introduction to Scripting the Finder.

Last month, we looked at the user interaction functionality in the Standard Additions scripting addition. This month, we are going to get started with some basic Finder scripting. We will briefly look at the Finder's dictionary, recording in the Finder, and some basic folder maintenance. In the future, we will explore other aspects of Finder scripting in greater detail. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > User Interaction Basics

August 2004 - User Interaction Basics.

Last month, we looked at some of the features of the new Script Editor, which was released with Mac OS X Panther (10.3). Now we are going to get started with actually writing some AppleScript code! This month's article will explain how, with only minimal code, you can update your AppleScripts to interact with the user. We will primarily focus on displaying dialogs and prompting for data. [Read more at MacTech.com...]

MacTech AppleScript Essentials Column > The "NEW" Script Editor

July 2004 - The "NEW" Script Editor.

A few months ago, Dave Mark wrote a couple of articles about AppleScript. These articles touched briefly on topics including setting up the script menu in Mac OS X Panther, performing some basic Finder scripting, and accessing application dictionaries. This aims to be the first in a series of articles geared toward providing a more in-depth look at AppleScript. [Read more at MacTech.com...]