Scan in iTunes

Here's an Applescript to make skipping to random tracks in iTunes a bit more like scanning through FM radio stations: it will select a random track and start playing at a random point. Save it in ~/Libray/iTunes/Scripts and assign it a key in Keyboard Shortcuts.


on run
	tell application "iTunes"
		set t to some track of playlist "Library"
		play t
		set player position to random number from 0 to duration of t as integer
	end tell
end run

load in Script Editor