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


Click here to return to the '10.4: Fix iChat's iTunes status message format' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Fix iChat's iTunes status message format
Authored by: DougAdams on Jun 27, '05 11:37:15AM
Here's an AppleScript that (so far) does the setting and quitting for you:
property literal_options : {"Song Name", "Artist", "Album", "Genre", "Year", "URL"}
property needed_options : {"%Track", "%Artist", "%Album", "%Genre", "%Year", "%URL"}
property delim : " - "
global my_new_string
set my_options to (choose from list literal_options with prompt "Show in iChat status:" with multiple selections allowed)
if my_options is false then return

set my_new_string to ""
repeat with this_choice in my_options
	repeat with j from 1 to count of literal_options
		if this_choice contains item j of literal_options then
			my set_delim()
			set my_new_string to my_new_string & item j of needed_options
		end if
	end repeat
end repeat

do shell script "defaults write com.apple.iChatAgent iTunesMessageFormat -string " & quoted form of my_new_string

try
	do shell script "killall iChatAgent"
end try

try
	tell application "iChat" to quit
	delay 3
end try

try
	tell application "iChat" to launch
	
end try

to set_delim()
	if my_new_string is not "" then
		set my_new_string to my_new_string & delim
	end if
end set_delim
Very preliminary, but you get the idea.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/

[ Reply to This | # ]

Doesn't Change Order
Authored by: xlax999999 on Jun 27, '05 12:06:28PM
Though this does change what you can display you cant show the information in the order you choose. However if you switch
Song Name
with
Artist
in line 1 and in the next line switch
%Track
and
%Artist
That makes it possible to change the order as mentioned in the hint.

---
xlax999999

[ Reply to This | # ]

Doesn't Change Order
Authored by: DougAdams on Jun 27, '05 12:36:20PM

Yeah, the script won't do the order you want. I just did it in the order I thought would be "logical".

REMEMBER: only 42 characters will show in your Buddies' status for you (DESPITE what you see in your status). Doesn't make a lot of sense to show "Song Name" and "Artist" and "Album" since there's no way all that text is gonna display.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/



[ Reply to This | # ]