Tag Archives: Help

Controlling Spotify through Applescript & Quicksilver.

Update Available: http://www.jacktams.co.uk/2009/10/09/spotify-applescripts-updated/

picture-2I have almost solely being listen to music through spotify for the last couple of weeks, sure it doesn't replace iTunes but its damn good at what it does, all you can eat music for free. http://www.spotify.com/

The Problem:
Spotify can use the built in shortcuts for play/pause, forward and reverse, but if like me you use a different keyboard and effectively 'dock' you Macbook its not much use. Enter Quicksilver, the perennial quick-launch and whiz-kid short-cutter for mac. http://bit.ly/yrlr7

I already have a load of triggers set up within quicksilver for everything from make an event in iCal to post a tweet or send email.

So getting Spotify in there, it turns out Applescript is here to help, using the System Events helper you can select a menu item without actually clicking it. Below is the code for the main actions you would want in Spotify. Simply save the apple script, then attach it to a trigger in Quicksilver. Hey Presto, magic! For more details on setting up triggers check the Quicksilver wiki, it explains it alot better than I ever could. http://bit.ly/134dnL

Play Next

  1. tell application "Spotify" to activate
  2. tell application "System Events"
  3. tell process "Spotify"
  4. click menu item 3 of menu 1 of menu bar item 5 of menu bar 1
  5. end tell
  6. end tell

Play Previous

  1. tell application "Spotify" to activate
  2. tell application "System Events"
  3. tell process "Spotify"
  4. click menu item 4 of menu 1 of menu bar item 5 of menu bar 1
  5. end tell
  6. end tell

Play/Pause

  1. tell application "Spotify" to activate
  2. tell application "System Events"
  3. tell process "Spotify"
  4. click menu item 1 of menu 1 of menu bar item 5 of menu bar 1
  5. end tell
  6. end tell

Notes:
Don't forget to activate assitive device support see http://www.macspeech.com/extensions/faq/kb.php?article=48

BTs Top Ten Causes For Slowness

I have been experiencing some heavy packet shaping by my usually pretty good ISP BT, when I emailed them to ask what was with the excessive packet shaping I got this reply.

If there is an EMI then the connection may drop or you may experience slow browsing. Please make sure that the modem is not placed near any of the following electro magnetic devices such as:

1. Halogen desk lamps near the modem or telephone line, especially those with dimmers.
2. Any electrical dimmer switch.
3. Electronic devices, such as stereo speakers, PC speakers, televisions, monitors, microwave ovens, etc.
4. Routing the telephone line parallel to an AC power cord for more than a few inches.
5. Electronic insect electrocution devices (bug zappers).
6. Low quality 900MHz cordless telephones.
7. Any other emitter of high frequency electromagnetic radiation.
8. Should not be placed above the computer tower.
9. Should not be placed directly on a carpeted floor.

How does carpet create an EMI, or for that matter any of them really effect speed of my connection.