Automation on the Mac
Welcome to the first of many AppleScript and Automator "how-tos." These tips are mostly geared toward Mac users who may know a little AppleScript, but want to learn more. If you've never opened Script Editor or Automator these tips will also help you get up to speed. First things first, what the heck is AppleScript? It is an easy-to-use and easy-to-learn programming language. AppleScript was created in the early 90s as a simple way for people to create their own custom automation programs. This is one of the reasons the Mac remains popular in the printing and creative industry, where users can take large work flows and automate them relatively quickly.
Automator was first released with Tiger and designed for users who don't have time to learn a programming language. You just drag actions together to produce a work flow, and then run it. It's that simple. The second version of Automator shipped with Mac OS X "Leopard," and it features new actions as well as a redesigned interface. I'll be showing you how to create time-saving Automator plug-ins and applications that can be used system-wide in future posts.
But how automation can benefit you and your work flow? By working more efficiently automation saves you valuable time and energy. Automation is also an easy first step into the wonderful world of Mac programming. However, automation can also be fun. Who doesn't want to make their Macs do cool things?
Before you jump into AppleScripting, you need to know a few basics. Over the next few weeks, I'll show you the basics of AppleScript and then we'll be able to move onto more advanced automation.
Stay tuned to TUAW; and before you know it, you will be Apple Scripting like a Mac OS X power user!
Share
Welcome to the first of many AppleScript and Automator "how-tos." These tips are mostly geared toward Mac users who may know a little...
Add a Comment
@Guglielmo Piega
cool! this looks hopeful.....
i wanna tweak it though and im not sure how. i will email the maker
of the script, thanks...
I'm a seasoned programmer in traditional languages like java, objective-c, vba, etc etc.
I agree that one of the largest hurdles for programming in applescript IS the language. BUT, if you actually attempt a couple of large projects the simplicity of the language begins to come through.
Automator, applescript and custom automator actions (via xcode/IB) have become my new favorite programming environment. They are incredibly handy in a work environment where I can create workflows that greatly aid novice computer users. As a result there's less work for me to clean up at the end of the day, and it's easier for the end user to do a specific task (especially tasks that are multi program).
i dont think this can be done, but if it can, i would like to write an applescript to change my OS language from English to Japanese. I would like to write another that will change it from japanese back to english. i live in japan and i am constantly switching languages because i teach english speakers and japanese speakers how to use their macs (obviously i dont teach them applscript, but everything else)
the current way to change languages is a drag.... i wanna save time. im on leopard now and even the new automator couldnt change it because i cant DRAG one language over the other with the new automator recording feature.... that would be great....
@ Meatleg:
Try this.
http://www.macosxhints.com/article.php?story=20061229203902170
I'm sure you have this in mind but I'll say it anyway. The Dictionary. How in the world are you supposed to read them? The books I have give examples in a format that applescript no longer uses in Dictionaries. Also, each program seems to be written differently and implements properties differently. It's really frustrating. I'm anxious to see if you will be getting past puff pieces on applescript that i see so much but avoid assuming your readers already know all of what you're talking about.
December 15 2007 at 12:10 AM Report abuse Permalink rate up rate down ReplyMaybe you can help me understand just what the heck Automator is?!?
I should note that I'm intimately familiar with Applescript, having coded a 1000-line Photoshop->DB script when I worked at Disney a few years ago.
So, does Automator replace Script Editor? How does Automator fit into what has become, in my opionion, a mess?
Cheers,
FL
Don't worry, I will start from the very basics of Automator; explaining what it is, how to use it, and how to make practical applications (and plug-ins) with it.
December 14 2007 at 10:00 PM Report abuse Permalink rate up rate down ReplyLooking forward to learning some applescript; thus far it has seemed more complicated to me than C (how ironic) so I haven't tried very hard to learn it and just do most things with small C programs.
December 14 2007 at 5:53 PM Report abuse Permalink rate up rate down ReplyI agree with #6 above. I find AppleScript very frustrating, but perhaps that's because I'm used to more "standard" programming languages. May I make the suggestion that you touch upon Ruby scripting for OS X? That seems like the perfect compromise: the power of OS X scripting with a more "normal" language like Ruby.
December 14 2007 at 5:51 PM Report abuse Permalink rate up rate down ReplyGuys, thanks for giving me a chance. I am going to start with the basics and go on from there. So, even if you haven't used AppleScript (or Automator) before, you will be able to jump right in!
December 14 2007 at 5:07 PM Report abuse Permalink rate up rate down ReplyPerfect post Cory. Keep it coming. I used to program for windows. Now I just can't wait to learn how to program for the Mac. Thanks for your efforts. And of course welcome to TUAW.
December 14 2007 at 3:43 PM Report abuse Permalink rate up rate down ReplyGreat topic, I've done very little applescript but I would love to get into more.
How about a script that involves dropping an image on it to resize the image, save it with a prefix and then upload it to a server. You could use CyberDuck or Transmit for the uploading.
Hot Apps on TUAW
Deals of the Day
more deals- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



25 Comments