User:TDS/script

on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars

using terms from application "Colloquy" on process incoming chat message msg set theMsg to body of msg as string if theMsg contains "" then			if theMsg contains "" then set theMsg to replace_chars(theMsg, "", "")				set theMsg to replace_chars(theMsg, "", "") set theMsg to "http://en.wikipedia.org/wiki/" & theMsg add event message "" & body of msg & "" end if		end if	end process incoming chat message end using terms from

Sorry about this. Apple has the worst documentation for AppleScript.