Nik's Picks: Automate your Mac with Hazel and Proxi

It’s a special edition of Nik’s Picks today with two whole picks! Why? Because, well, these two apps are great tastes that go great together!

Today, we’re going to talk about automating your Mac with Hazel and Proxi. I’m an avid AppleScripter, and I can’t say enough good things about making those tiny repetitive tasks automatic. I have about thirty or so little scripts (scriptlets, I call ‘em) which do one thing that I often want to do or just would rather have automated.

But these scripts are not necessarily easy to write, even with Automator to help out, and there’s a lot of common jobs you may want to get done which simply aren’t possible without some fairly henious AppleScript-fu.

That’s where our two picks come in…

Proxi

First, we’ll look at Proxi, from Griffin Technology. This program looks a lot like Automator, at first glance, because, well, it is. You can set up one or more sets of triggers and tasks in a so-called “blueprint.” Okay, that sounds complicated, let’s try this again…

You can tell Proxi to make something happen (a task) whenever something else occurs (a trigger). That better?

What’s a trigger? Well, there’s a bunch. You could trigger on a keystroke, or when a folder changes (very similar to AppleScript’s “Folder Actions,” except somewhat more reliable, in my experience), or in reaction to incoming mail, a press of a button from your Apple remote, or when you use one of Griffin’s input devices like a PowerMate or Airclick.

As for actions, it’s the usual array plus some nifty extras. You can write out a file, send an email, open an application/file, or even kick off an AppleScript!

What makes this especially cool is that you can add some extra complexity to your actions. So you could have a watched folder kick off a script when a file’s added but only do it when the file is of a certain size, or has a certain name. That kind of logic is impossible in Automator, and can even be quite challenging in AppleScript, so this is a far easier solution.

Griffin offers this program as a companion to all of their nifty input devices, but it works just as well without them, and it’s a free download! Thanks, Griffin!

Hazel

Okay, so enough about Proxi, what about Noodlesoft’s Hazel? Proxi does everything, right? Why do I need or want something else?

Well, Proxi’s a big toolkit, but Hazel is more of a one-stop-shop for doing one thing exceptionally well, and that thing is keep your folders (and trash) neat and tidy.

Hazel is a simple preference pane which lets you add folders that Hazel will watch. When you add files to those folders, Hazel will then apply rules to it. These rules are just like email rules, in that you set the criteria for the rule, and the result of the rule. So files larger than a given size might automatically be archived (zipped), whereas all Word files might get tagged with a certain Spotlight comment.

How can you use this? Well, all kinds of ways! You could add a spotlight comment with a certain project’s name every time you save a file into that project’s folder. Alternately, you could have your Download folder automatically delete leftover partial downloads.

You can also use it to keep your trash clean by selectively deleting old files or large files from the trash, so you never have to empty it and it just sort of “rolls” out the oldest stuff.

The one thing Hazel can’t do with its rules is launch an application or AppleScript. A glaring oversight, in my opinion, but that’s what we have Proxi for, right?

Hazel is $16 and can be downloaded for free to try out.

Written on September 8, 2006

Problems with Mail to KGTD

A number of users have reported that when their mail rules activate Mail to KGTD, they get an error type 8. I’ve tracked down the CAUSE of this problem, but I’m not quite at a solution yet.

The cause is that when messages come in, they don’t seem to have message IDs anymore. Since my script requests a message ID, everything borks when it tries to get it. Once messages are properly received (after rules are run), they have IDs (like they should), which is why Mail Act-On continues to work, as will the rule if you edit it and then request that the new rule run on all messages in your inbox.

The script also works fine from Quicksilver, LaunchBar, the scripts menu, FastScripts… Any way you kick it off except for on an incoming mail rule will work just fine.

As far as I can tell, this is a bug in Mail (one of many Applescript bugs which haven’t been fixed for many, many, updates, I’m afraid). It was introduced during a recent security update, which I hadn’t yet installed, which is why I was having trouble replicating this error.

The best I can do, I think, is to remove the ability to create a link to the original message, which will avoid the need for a message ID, but also loses the link, which I know a lot of users like. I’m hoping I can find a way around that.

So, at any rate, I’ve found the root cause of the problem and I’m working on a fix. I’ll post an update here once I have a fix or workaround.

In the meantime, please let me know in the comments whether or not you make use of the “link” feature, or whether you’d just as soon see it go by the wayside. It takes a looooong time on some folks’ Macs, so perhaps it’s just unnecessary.

Written on August 30, 2006

Online peace of mind with GlowWorm FM Lite

I’m a long time fan of Little Snitch, which is a nifty application from Objective Development that lets you monitor and restrict which applications and processes can access the internet. This gives maximum protection from spyware and other malicious software which “phones home” for any reason.

On the Mac, Little Snitch has been without competition for quite a while. But it looks like things are heating up.

GlowWorm FW Lite is a new freeware utility which does much the same thing. Like Little Snitch, you can create fairly complex rules (such as allow an application access to only certain destination hosts, or allow a program access over a single port to any host or various other combinations). I haven’t tested it in detail, but it appears to work quite well, and the price is hard to beat.

As for whether you need this, well, that depends on how much you care about knowing which programs contact which servers, and also how diligent you are about security. For me, I find the peace of mind this kind of utility provides is well worth it. Even innocuous calls to home base are sometimes inadequately disclosed, and this keeps me aware of them.

Written on August 24, 2006

Text mining could save Digg

Many sites have already reported on the fact that the popular news site, Digg, is overwhelmingly controlled by a very small group of users. Furthermore, some users predict that unless Digg can again become a true interactive community, the site is done for, because it will become repetitive and untrustworthy; neither the word of the masses nor properly edited and authentic journalistic content.

Many of these complaints have one thing in common: They examine the large quantity of front-page (highly “dugg”) articles which are, in fact, duplicates of previously dugg articles from less well-connected users.

And so, I propose that what Digg could do to “save” itself (as though the wildly popular site truly needs a saviour) is to reduce duplication through textual analysis data mining. Or, less technically, by helping users find related, dugg, articles to the one they’re digging or reading.

Side note: What I mean by textual analysis is the practice of scanning normal text and looking for patterns and similarities with other text. This can be done automatically, by an variety of statistical and data mining packages. An obvious use of this sort of tool is contextual ads, as served up by Google AdWords, although you can be far more precise than those simple AdWords if you put the effort into it.

You see, Digg already checks for duplicate articles, but it restricts itself to checking for a submission that contains exactly the same link as another article. This works fine for, say, blog posts, where there is one authoritative source for the article, but it falls down when there are multiple sources.

Multiple sources are common with news sites (an Associated Press or Reuters article will show up identically on tons of different news sources), or breaking stories which are covered by multiple sources. Additionally, many sites reference primary sources, but a Digger may decide that it’s better to Digg the more nuanced reference source rather than the primary source.

In any of these situations, Digg’s automated processes won’t find the original source.

Of course, Digg encourages its users to search before posting, but Digg’s database is huge, and most simple searches are inadequate to find the same post. (And, in some cases, their search won’t even turn up a post if you type in exactly the same title, because the story has been buried or otherwise hidden by some behind-the-scenes process.)

So instead, Digg would be well served to use text-mining tools to classify its articles and relate them to one another. Then, upon digging a link, a user would be faced with not only the “This link is a duplicate” message, but also “These Digg entries are similar to what you posted, please check them and make sure you aren’t duplicating an existing post.” This could be done with far more precision than a search, and would also save Diggers a step, encouraging them to post their articles but to still be circumspect as to whether they’re encouraging duplication.

These related articles could even appear in a sidebar along with their article, thus serving the purpose of helping the masses of Digg readers to bury duplicate articles, as well as providing “additional reading” on related topics. Users clicking on these related articles would increase Digg’s page views (and profitability), and would also potentially promote low-Digg-rank articles which are related to topics which made it to the front page.

I realize that this would be a substantial investment, but it would greatly increase the value of Digg, and make it more open to less popular Diggers. And none of this is rocket science; dozens of sites use these techniques to help their readers find the content they need. In the case of Digg, it can also be used to maintain the highest possible levels of editorial.

Written on August 23, 2006

An experiment in RSS organization

At last count, I had a few hundred RSS feeds in my NewsGator web reader. These represent a few thousand headlines every day, and it’s rare that I’m able to read all of them.

As a result of this, I get very stressed when I start reading. I’ll click on my “news” group (which is the largest group, post-wise, generating 300+ new headlines every day), and cringe as I work through 5-10 pages of headlines. Even with my triage-then-read approach (I “clip” interesting headlines and then revist them when I have more time, part of an effort to keep my RSS influx managed), it takes ages to get through all this, and I can’t help but think it isn’t useful.

So today I set up something different. Instead of grouping my feeds by subject (I had them grouped into Technology, Business, News, Fun, Friends, Productivity and My Sites; plus some sub-groupings such as Macintosh, General Tech, etc.), I’ve grouped them by how much I want to read them.

So my new list is a lot flatter. I have A Must Read, Better Read, Like to Read and Maybe Read. The names are cute, but also rank alphabetically, so that’s nice.

The sites that I love so much that I want to always no matter what read every post go into the “A Must Read” group; followed by sites I like a lot, but could miss on a busy day (Better Read); which rank about sites which I really enjoy but generally just distract me at work (Like to Read); and finally those sites which I’ll read when I have time, but could clear out any time I want without any pain (Maybe Read).

Now none of this means that the individual feeds represent important sites. Most of the sites in the “A Must Read” category are my friend’s blogs and the RSS feeds announcing new releases of software I like to keep on top of.

There’s plenty of heady, good stuff in “Maybe Read,” such as the Washington Post and a couple really good technical blogs; but these things represent longer reads and stuff which I don’t necessarily need to keep up on every single day.

The end result of all of this is that I know to always check the “A Must Read” group if there’s a new post in there, and I’ll almost always read the “Better Read” group, but may put it off for a day or two if I’m busy. As for the rest, I’ll comb through those if/when I have time to spare.

And yes, I threw Digg into the “Like to Read” group. It’s great to have my cursor on the pulse of the internet’s latest fads, but mostly it’s just a time sink. Everything really popular on there ends up on another blog or forum I read anyhow.

Now, if I could only do this with email…

Written on August 23, 2006

The best kind of users...

Mike Sale wrote me today and asked the following:

> Do you have anywhere I can donate toward your kGTD scripting efforts?

Well, I never did this for the money, but I surely would like a copy of Script Debugger to help streamline all this scripting I’ve been doing. So I decided I’d put up a donation link through which anybody who wants to can send a few bucks to help pay for Script Debugger.

Now this doesn’t mean that the scripts have become donation-ware or anything. They’re still 100% free of charge, open source, and provided out of the goodness of my heart and the assistance of all the AppleScripters I crib code from.

But if you want to contribute toward my very own copy of Script Debugger, feel free.

Written on August 22, 2006

I hate Drupal's themes

Okay, yet another theme on this site. This one’s pretty and Mac-like, but it’s also clonesville. I really need to put some time into skinning this site right, but I just can’t get excited about web design.

So, we’ll try this for a bit. It’s more usable, if a tad more garish, than the one I had before.

Written on August 21, 2006

Nik's Picks: Witch

I’ve heard a number of complaints from “switchers” and Windows users about the Mac’s command+tab application switching behavior. The complaint is always the same: It only shows applications, how can I get to the exact window that I want?

Now, I’m a cross-platform-dresser, myself, and am equally (or nearly so) expert in both Windows and the Mac. In fact, I use Windows every day, probably for more time than I use my Mac. But the thing is, the alt+tab application switcher does show all the windows and documents, but I find it more frustrating than useful.

I suspect the reason why I find it so frustrating, is that I tend to open a large number of documents in the same program. To the alt+tab switching window, one Excel file looks like another, so if I have five or six spreadsheets open, I have to scrub through each one to see what the filename is.

What I tend to do is just switch to Excel and then select the document I want from the list of open windows. Pretty much the same as I do on the Mac.

But there are time, I’ll admit, when picking exactly the right window would be a time saver, so I went looking for the solution. I found it in Witch by Peter Maurer (creator of Butler and many other fine Macintosh utilities).

Witch is an application switcher that can be activated with a keyboard command of your choosing. (Excepting command+tab, which is reserved for the Dock – shame on you, Apple!) It pops up a nice bezel which lists your applications and their open windows in a pleasant vertical array. Best of all, it lists the full name of every single window and application, thus making switching to them a breeze!

You can also use it to quit, hide, or minimize windows and applications, and can ever create a shortcut to switch between your current application’s open windows, without getting bogged down in the whole application list.

It is immensely configurable, permitting careful control of what the bezel looks like, font size (although the fonts shrink dynamically if you have a large number of windows/applications open), and keyboard shortcuts.

It’s price is simply whatever you think is fair, as it’s donation-ware (along with most of Peter Maurer’s excellent software). The combination of the extremely fair pricing, excellent feature set, and solid reliability would normally earn such a utility a cool 7 out of 7 stars, and a hallowed place among Nik’s Picks, except for two things:

  1. It’s a bit slow. There’s a brief stutter when I bring it up, especially if there’s a large number of windows open. I suspect it relies on Apple Events to enumerate windows, and that is a bit slow. (Keep in mind, however, that I have a rather pokey Macintosh – a mere 1 ghz G4.)
  2. I cannot map cmd+tab to Witch. I recognize that this is not Mr. Maurer’s fault, but it does mean that I have to take up another universal keyboard command for a tool that should really replace and supersede Apple’s application switcher.

Regardless, it’s a fantastic utility and is free to try. I highly recommend that you give it a go and see what you think.

Written on August 19, 2006

Dreamhost gets customer service right

Dreamhost, the company which hosts this site, recently suffered some pretty major issues. A few of the files I host here got messed up, there was some downtime, etc… No big deal for me, since this site only gets about 1,000 visits a month, but pretty bad for folks running businesses at Dreamhost.

However, Dreamhost has done a great job dealing with this. They keep a blog letting you know what’s up with every server, and they’ve released a detailed accounting of what happened and how they’re resolving these problems and making sure they won’t happen again.

A lot of companies would, instead, try to obfuscate and tell you it’s a short problem and quickly resolved. I have to say, that as someone who relies on their services, I much prefer the up-front approach. They’re, effectively, my IT/MIS department, and I appreciate the regular updates.

This is a good lesson for any business or business unit to learn from. If folks are relying on you, they’ll often respond better to advance warning of failure than they will an apology (or, worse still, excuses) after the fact.

Written on August 3, 2006

OmniOutliner List Manager

This set of Applescripts lets you use OmniOutliner Pro to keep a variety of lists on your computer and easily add items to them from the script running application of your choice. (Including LaunchBar or Quicksilver!) These lists can also be set up to automatically sync to your iPod as iPod notes in order to take ‘em with you on the road.

What kind of lists? Well, anything! A list of presents to buy, movies to rent, books to read, things to do before you die, groceries to pick up, names for your unborn child… The mind boggles!

A lot of people use text files for these kinds of lists. Call me an interface nerd, but I prefer something a little more… robust to maintain my lists. Specifically, I like OmniOutliner. So, I made this little program to give me the ease of use and flexibility of a text file within the wonderful interface of OOP.

Requirements:

* OmniOutliner Professional 3.x
* MacOS X 10.x (tested in 10.4, but it should work in earlier versions)
* Optional: Launchbar or Quicksilver for rapid list entry
* Optional: iPod to carry your notes with you

These scripts will probably work with older versions of the MacOS and OmniOutliner, but I’ve only tested them under MacOS X 10.4.

*Note: Downloads were broken for a while. They work now. Sorry for the trouble.*

Written on August 1, 2006