Tuesday, November 20, 2007

Automator is much improved

It's funny that after all I've read about the new improvements to Leopard, no one has mentioned the new additions to Automator. Well, maybe they don't use it that often, but for a person who is by far more comfortable with scripting than programming, I think Automator makes my life exceedingly easy.

I can say that there are still things you can't do in 'Otto', but most things are now possible with the addition of Terminal commands. It is very easy to create a simple workflow or app to click on to run something you would normally have to type in the terminal to do. Not to mention, it makes hard to remember steps quite easy. For example, it has been circulating the internet that everyone hates the new 3D dock. And I must say, I used someone else's trick to change it to the 2D version for a little while, until I learned that I could change the color of the shelf. But it doesn't stop there. I can add textures, make it shinier, bolder, subtler, whatever I want. The hard part is changing the files each time I want a new look. Enter Automator. I have quickly and easily made it possible to change my dock shelf with a simple click on a workflow, choose my color and voila, a new and improved dock. Let me show you how I did it.

First, you have to modify the image or png files. These are all located in System/Library/CoreServices/Dock.app,
You'll have to right or command click and choose 'Show Package Contents'. Then navigate to /Contents/Resources
Here there are 4 files all beginning with Scurve-x.png, where x is either l, m, xl, s.
Copy these files. I chose to make a folder where I keep all my modified system images, I called it DockColors, and it contains subfolders for each new set of images I render in different colors. Right now I have several which I'd like to show.

This one is simply Red

This one I call Lime

This one I call Charcoal

This one I call Cement

This one I call Sumi

Okay, now that I've shown off, let me explain how Automator helped me to make this change as simple as clicking on a workflow.

First, start your copy of Automator and drag to it "Run Shell Script" from the Utilities menu. Type the following in for the script making changes to paths as necessary.

cd /Users/z_evil_genius/Pictures/MyArt/ModifiedSystemImages/DockScurve

cp -fR Sumi-e/ /Volumes/Macintosh\ HD2/System/Library/CoreServices/Dock.app/Contents/Resources/

killall Dock

Save it as a workflow with a meaningful name to tell you the color, I chose to put it in a folder called Dock Color Scripts and put that in my Scripts folder. The first line changes the current working directory to one that has all your subfolders containing copies of the Scurve files.

Notice in the second command I have 'cp -fR Sumi-e/', This is copying the contents of the folder Sumi-e which contains copies of the Scurve image files. This also means that you'll need to change this name to the folder you created to house the image files. For example, I called my Red one Blood (even if it isn't quite the right color yet) and so to copy my red Scurve files I would type cp -fR Blood/

The last line obviously restarts the dock.

For every new set of colors you'll want to create a new script like this and a new folder to store the Scurve files. Now, this script is runable as is. Just go to your scripts folder and open the new folder Dock Color Scripts, click on your new color and watch the magic.

I certainly hope this helps you to appreciate the power of Automator as well as learn a new trick to making that hard to see dock look much better.



Apple Feedback

2 comments:

  1. Well, I've discovered an error in which using my scripts will not update the dock. I will get back to you all once I've figured out what's keeping it from working.

    ReplyDelete
  2. Please check my blog for a more recent discussion on this topic. I've discovered the problems and have completely rewritten the tutorial. You might need this one for references such as where the Dock image files are and such, but most of the Automator information in this post is useless.

    ReplyDelete