<p>In the last days I found myself doing over and over the same combo: rating a music 5 starts in iTunes and then loving it in Last.fm, so as any Software Developer, I automated the process:</p>

<pre class="code">tell application "iTunes"
	set rating of current track to 100
end tell

tell application "Last.fm" to activate
tell application "System Events"
	key code 76 using command down
end tell

tell application "System Events"
	set visible of process "Last.fm" to false
end tell</pre></p>

<p>Saved as a application in my AppleBin directory, and now I just use spotlight to reach it (Sorry, but I can&#8217;t get used to quicksilver&#8230;)</p>

<p>And I just love reading AppleScript! As for writing, it sucks :/</p>