Tuesday, July 22, 2008

WinPopup Quicksilver Module

During the last couple of months I've noticed that a lot of times I had to send URLs, or names of things, or basically - all kinds of strings, to other computers on my network.

This is not about sending stuff to my other computer, for which I have Synergy with it's wonderful clipboard sharing, but to my dad or my brother.

So every time it happened I resorted to e-mail, which was kind of cumbersome (less for me, for I use Quicksilver, but for my brother and dad).

If you haven't heard of, or haven't started using Quicksilver yet, you just don't know what you're missing. It is probably the one best piece of software there is for the Mac (second-best must be TextMate).

Many articles and tutorials have been written about Quicksilver, so I'll just spare it and link to a very good beginner's tutorial, which helped me when I first started using it.

Anyway - I figured one neat way to send those strings to my network neighbors is to use the Messenger Service (WinPopup). For those who aren't familiar with it - do you remember some 4 or 5 years ago, when message boxes with advertisements were popping up every minute or two? That was an abuse of the Messenger Service. It lets you send messages to other computers with the service on.

In Windows those messages are sent with the NET SEND command. Some quick googling revealed how to send them from the Mac (smbclient -M target_name [-U source_name]) and how to get a list of the WINS host names in your workgroup (nmblookup -R -M -- - to get the IP of the WINS server, and then smbclient -U% -L to get the list of clients).

I then sat to write a Quicksilver plugin that would create a catalog of those WINS clients, and allow me to send them Messenger Service messages.

It turns out there is almost no documentation regarding the process of writing Quicksilver plugins. Using the very lacking documentation from Blacktree, the most-useful documentation from a guy named Ankur - Parts 1, 2 and 3, and by looking at what happens in the File Tagging Module, I wrote my WinPopup Service Module.

The module itself is available for download here, and so is the source.
There is a new version available here.

Have fun,
Tomer

P.S. Don't forget to turn on the Messenger Service on your PCs, and make sure they're all in the same workgroup and so is your Mac.

No comments: