Laziness To The Max: Automation With Macros

Part of: BC App Attack

As an iOS developer, I love to update my apps whenever Apple introduces a new device. Especially when that new device is an iPad with a Retina Display.

Apple's Retina Display has four times the pixel density of a normal, 72 DPI display. It is essentially squeezing four pixels where one pixel should be by the method of doubling the vertical and horizontal pixel lengths. The new iPad has 2048 x 1536 pixels, twice the vertical and horizontal resolutions for the original iPad's 1024 x 768 pixels.

App developers need to create higher resolution versions of their existing image resources in order to take advantage of the sharp screens. This resizing, reimporting, and retesting is not the fastest process. So how can we make it faster and more painless?

One of my apps is Geometry Stash, a geometry reference tool. Its terms and diagrams are in the Adobe Illustrator vector format. The vector format contains data for the curves and other functions in the graphic.

Illustrator reads the data and can make transformations accordingly without quality loss. Above, a curve is simply stretched.

Here's the current process:

• Resize the Artboard through the Artboard Tool.
• Select all items and resize as Illustrator smartly sees the outermost-to-edge items as the edges for resizing.
• Export "using Artboards" to constrain the images to the right size.

This process took 18 key and mouse clicks. A waste — we're trying to conserve energy these days!

So I looked to automating Illustrator using Actions. You can get to the Actions menu by checking Windows > Actions.

• Create a new set AKA a folder by clicking the folder button at the bottom of the window.
• Select the created set and click the new item button to the right of the folder button. This item is like a macro for Illustrator. Instead of simulating key presses, however, it will run the operations that you perform.
• Select your item and click the button with the circle on it to record operations.

Above, I recorded the operation Select All.
The next item resized both the Width and Height through Transform.
Lastly, Export to a folder.

The reason that I put these operations in separate items was that the Transform operation would not work if placed right after the Select All.

Continued on the next page Page 1 — Page 2

Article tags

Spread the word
Bookmark and Share
Profile image for anson-liu

Article Author: Anson Liu

Develops and markets iOS apps at Apparent Etch.
Takes on unconventional randomness.

Visit Anson Liu's author pageAnson Liu's Blog

Read comments on this article, and add some feedback of your own
  • No image found

Article comments

Add your comment, speak your mind

Personal attacks are NOT allowed.
Please read our comment policy.
Please preview your comment.

blogcritics lists for May 22, 2013

fresh articles Most recent articles site-wide

fresh comments Most recent comments site-wide

most comments Most comments in 24hrs

top writers Most prolific Blogcritics for April

top commenters Most prolific Commenters in 24 hrs