Message
back to the journal

Archive for the ‘osx’ Category

Using Quicksilver to control Last.fm

August 7th, 2009

Quicksilver & Last.fm

For a while, I’ve been using handy Quicksilver triggers to control iTunes. I like not needing to switch my attention from what I’m working on, in order to skip a track, pause the playback, set a rating or whatever. You can find out how to create a trigger from one of the many great Quicksilver tutorials out on the Web.

At the moment though, I find myself listening to Last.fm more and more, and have been looking for a similar way to control the Last.fm application. I couldn’t find a plugin for Quicksilver to achieve this so I set about writing an Applescript which I could trigger with Quicksilver.

I’m not much of an Applescript whizz, but I managed to put the following script together to skip the track currently playing in the Last.fm application:

tell application "Last.fm" to activate
tell application "System Events"
	tell process "Last.fm"
		click menu item "Skip" of menu "Controls" of menu bar 1
	end tell
end tell

After saving this in a suitable location (I have a Utils folder where I keep lots of scripts and utilities), I set a Quicksilver trigger to run the script. Simple!

Happy with the result, I created similar scripts for some other controls like love, ban, play and stop and assigned them all keyboard triggers.

My only wish was that I could do this without giving Last.fm focus. Generally this is fine for my because I have it running in a second display, so it doesn’t steal my attention, but it would be nice if I could get Applescript to execute the command without activating the application. I’d welcome suggestions from anyone with more Applescript fu than me.

How to create and distribute lovely screencasts

March 28th, 2008

For a while I have been meaning to start posting screencasts of some of my work to spread the word, and to explain some of the details that are difficult to describe in text.

After much tinkering, I think that I have arrived at a nice setup and have found a good way to distribute the screencasts, making them available to stream over the web or to download for consumption in your own sweet time.

In this post, I’ll share my findings so that you can set yourself up with a similar environment. I use a Mac, and so these tips are leveled squarely at the Mac users out there. Sorry to everyone else, but I’m just writing about what I know.

Read the rest of this entry »

Opening a Finder window from the Terminal

November 14th, 2007

I stumbled upon a simple method for opening a Finder window at your current Terminal session location recently. Since it is something that I have a regular need for, I thought that there might be other Mac users out there who might also find this useful from time to time.

Read the rest of this entry »