What’s this all about then?
rb-appscript is a powerful way to automate your Mac. It's similar to Applescript but it's built in Ruby, which means you get to leverage that language's powerful syntax and libraries. Giving you more time to make toasted sandwiches. You want long-winded explanations? We got those.
Please note that these scripts are by no means bulletproof, and are intended to provide examples of application scripting. I take no resposibility for any loss of data or mishaps; you download and run everything at your own risk. That said, I use all of these scripts in a production environment every day (well – more accurately, I use some of these scripts in a production environment most days).
Author Archives: ian
iTunes: Remember Position of Selected
Have you ever downloaded something that wasn’t a podcast, but should behave like a podcast? You know, Russell Crowe reading the collected works of Tolstoy, that kind of thing. This simple script takes your iTunes selection and sets the “bookmarkable” property to true, so it will remember where you’re up to (invaluable during War and [...]
Posted in itunes Leave a comment
Illustrator: Turn Off Artboard Junk
Illustrator CS4 has artboards. All well and good. However, the amount of information that these things are festooned with defies belief – it’s like being in the cockpit of a Stealth Bomber. OK I’m exaggerating (slightly) but this script kills the cross hairs, safe areas, and center markers on all your artboards, in one fell [...]
Posted in illustrator Leave a comment
Illustrator: Save Copy as AI3
Save the frontmost document as an Illustrator 3 file. Handy for programs that import Illustrator, but don’t recognise the latest versions (such as Cinema 4D). Download Save-copy-as-AI3.rb.zip The source code is available for your perusal below.
Posted in illustrator Leave a comment
Illustrator: Merge Selected Text
Often, when opening a PDF in Illustrator, the text is split into a whole bunch of discrete chunks. This will (hopefully) speed up merging them back together. Just select the text and run the script. Bingo! Download Merge-selected-text.rb.zip. The source code is licking its wounds below.
Posted in illustrator Leave a comment
Illustrator: Renumber Artboards
Renumber artboards from left to right, top to bottom. Handy when you’re creating a storyboard and need to add or delete frames. Here’s a demonstration. Double click it for full screen – if you’re man enough. Download Renumber-artboards.rb.zip. Source code, after the jump. Stay tuned!
Posted in illustrator 6 Comments
Mail: Save Selected Emails as Text Files
This little baby asks your for a destination, then loops through every email you’ve got selected and attempts to save it there as a text file. Why you can’t just drag your emails into a folder is quite beyond me. Download Save-selected-emails-as-text-files.rb.zip. The source code is chuckling quietly to itself, just over there.
Posted in mail Leave a comment
Rb-Appscript Resources
Here are a few links to help you wrap your head around rb-appscript. If you’ve got any more you’d like to share, go ahead and email me. rb-appscript home This is rb-appscript HQ, where Hamish Sanderson pops the hood and performs inexplicable miracles with Apple Events. Scripting Mac Applications With Ruby: An AppleScript Alternative. Matt [...]
Posted in learning Leave a comment
Illustrator: Fit Artboard to Artwork
This fits the first artboard to the geometric bounds of all the page items in your document. Unfortunately I can’t get it to just shrink one artboard to its contents; the geometric bounds apply to every page item on every artboard. Still, better than getting a splinter under your fingernail. Download Fit artboard to artwork.rb. [...]
Posted in illustrator 12 Comments
Keynote: Add a Folder of PNGs to This Slide