Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Display currently playing iTunes song as iChat AV status' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Display currently playing iTunes song as iChat AV status
Authored by: shmit on Jul 12, '03 03:00:21PM

Well, I changed the script a little bit so it'd only update iChat if your set to available in it.

on idle
	tell application "iChat"
		if status is available then
			tell application "iTunes"
				if player state is playing then
					set a to artist of current track
					if a is "" then
						set a to "unknown artist"
					end if
					
					tell application "iChat"
						set status message to "NP: " & a
					end tell
				end if
			end tell
		end if
	end tell
end idle

if you want to set the status back to available when iTunes isn't playing, you can make it look like this:

on idle
	tell application "iChat"
		if status is available then
			tell application "iTunes"
				if player state is playing then
					set a to artist of current track
					if a is "" then
						set a to "unknown artist"
					end if
					set a to "NP: & a
				else
					set a to "Available"
				end if
					
				tell application "iChat"
					set status message to a
				end tell
			end tell
		end if
	end tell
end idle


[ Reply to This | # ]