Search Amazon MP3 Store for selected/previewing track in iTunes Store

I was hoping to find an AppleScript (that I’d trigger with a hotkey) which could somehow determine the necessary details of a song that’s either selected, or is current being previewed, in the iTunes Music store - then once the script has collected these details it would launch my default browser and search the Amazon MP3 store to see if the song was available on that site’s catalog (so that prior to purchasing the track in iTunes, I could possibly save 10-cents and have a DRM free copy of the song I’m interested in)…

One of Doug’s iTunes scripts — http://dougscripts.com/itunes/scripts/ss.php?sp=searchamazonmp3 — does exactly what I am hoping to do, but it only works for tracks in your iTunes library and not on the iTunes Store.

I’d be extremely grateful if someone could perhaps take a look at Doug’s script and tweak the code to make it work in the itunes store as well (if that’s even possible)

Any help would be greatly appreciated. Thanks!

Hi m021478,

I think the reason that makes your workflow request so difficult is, that you cannot easily access the selected/previewed iTunes Store track with AppleScript.

When I execute the following script code while listening to a preview in the iTunes Store, I get an error stating: «iTunes got an error: Unknown object type.»


tell application "iTunes"
	get current track
end tell

Also a «get selection» command returns an empty list. Maybe GUI Scripting can be of help in this situation?