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


Click here to return to the 'Set iChat status by Network Location (revisited)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set iChat status by Network Location (revisited)
Authored by: mattshep on May 14, '04 08:43:59PM


property Locations : {"Home", "Work", "Automatic"}
property Messages : {"@home", "@work", "?"}

tell application "System Events"
	
	set Location to do shell script "scselect 2>&1 | grep '^ ' 2>&1 | grep '*' | cut -f 2 -d '(' | cut -f 1 -d ')'"
	
	repeat with i from 1 to count of Locations
		if Location is item i of Locations then
			return item i of Messages
		end if
	end repeat
	
	return "Error: No match"
	
end tell



[ Reply to This | # ]