More about Alcides Fonseca
Go Back

A little applescript snippet

Written by Alcides Fonseca at 2008/04/02

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:



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



Saved as a application in my AppleBin directory, and now I just use spotlight to reach it (Sorry, but I can’t get used to quicksilver…)



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