<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jacktams.co.uk &#187; how to</title>
	<atom:link href="http://www.jacktams.net/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jacktams.net</link>
	<description>Sweating Spinal Fluid.</description>
	<lastBuildDate>Sun, 05 Feb 2012 19:55:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Controlling Spotify through Applescript &amp; Quicksilver.</title>
		<link>http://www.jacktams.net/2009/05/15/controlling-spotify-through-applescript-quicksilver/</link>
		<comments>http://www.jacktams.net/2009/05/15/controlling-spotify-through-applescript-quicksilver/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:31:56 +0000</pubDate>
		<dc:creator>Jack</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[Help]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[quicksilver]]></category>
		<category><![CDATA[spotify]]></category>
		<category><![CDATA[triggers]]></category>

		<guid isPermaLink="false">http://www.jacktams.co.uk/?p=569</guid>
		<description><![CDATA[Update Available: http://www.jacktams.co.uk/2009/10/09/spotify-applescripts-updated/ I 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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update Available: <a href="http://www.jacktams.co.uk/2009/10/09/spotify-applescripts-updated/">http://www.jacktams.co.uk/2009/10/09/spotify-applescripts-updated/</a></strong></p>
<p><img src="http://www.jacktams.co.uk/wp-content/uploads/2009/05/picture-2-150x150.png" alt="picture-2" title="picture-2" width="150" height="150" class="alignright size-thumbnail wp-image-589" />I 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. <a href="http://www.spotify.com/">http://www.spotify.com/</a></p>
<p><strong>The Problem:</strong><br />
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. <a href="http://bit.ly/yrlr7">http://bit.ly/yrlr7</a></p>
<p>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.</p>
<p>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. <a href="http://bit.ly/134dnL">http://bit.ly/134dnL</a></p>
<p><strong>Play Next</strong></p>
<pre class="applescript"><span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;Spotify&quot;</span> <span style="color: #b1b100;">to</span> activate
<span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;System Events&quot;</span>
   <span style="color: #b1b100;">tell</span> process <span style="color: #ff0000;">&quot;Spotify&quot;</span>
      click menu item <span style="color: #cc66cc;">3</span> <span style="color: #b1b100;">of</span> menu <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">of</span> menu bar item <span style="color: #cc66cc;">5</span> <span style="color: #b1b100;">of</span> menu bar <span style="color: #cc66cc;">1</span>
   <span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span>
<span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span></pre>
<p><strong>Play Previous</strong></p>
<pre class="applescript"><span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;Spotify&quot;</span> <span style="color: #b1b100;">to</span> activate
<span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;System Events&quot;</span>
   <span style="color: #b1b100;">tell</span> process <span style="color: #ff0000;">&quot;Spotify&quot;</span>
      click menu item <span style="color: #cc66cc;">4</span> <span style="color: #b1b100;">of</span> menu <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">of</span> menu bar item <span style="color: #cc66cc;">5</span> <span style="color: #b1b100;">of</span> menu bar <span style="color: #cc66cc;">1</span>
   <span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span>
<span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span></pre>
<p><strong>Play/Pause</strong></p>
<pre class="applescript"><span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;Spotify&quot;</span> <span style="color: #b1b100;">to</span> activate
<span style="color: #b1b100;">tell</span> application <span style="color: #ff0000;">&quot;System Events&quot;</span>
   <span style="color: #b1b100;">tell</span> process <span style="color: #ff0000;">&quot;Spotify&quot;</span>
      click menu item <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">of</span> menu <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">of</span> menu bar item <span style="color: #cc66cc;">5</span> <span style="color: #b1b100;">of</span> menu bar <span style="color: #cc66cc;">1</span>
   <span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span>
<span style="color: #b1b100;">end</span> <span style="color: #b1b100;">tell</span></pre>
<p><strong>Notes:</strong><br />
Don't forget to activate assitive device support see <a href="http://www.macspeech.com/extensions/faq/kb.php?article=48">http://www.macspeech.com/extensions/faq/kb.php?article=48</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacktams.net/2009/05/15/controlling-spotify-through-applescript-quicksilver/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

