All pastes #1581964 Raw Edit

MacIrssi and iTunes applescript

public text v1 · immutable
#1581964 ·published 2009-09-27 23:12 UTC
rendered paste body
-- small script to use for displaying iTunes track+artist+album wherever you open an applescript
-- when iTunes is running
tell application "iTunes"
	
	if player state is playing then
		-- get track, artist and album
		set currenttrack to the name of current track
		set currentartist to the artist of current track
		set currentalbum to the album of current track
		-- show track, artist and album
		set titleinfo to (currenttrack & " - " & currentartist & " | " & currentalbum)
		set output to titleinfo
	end if
end tell