-- Change this to the list of chat names you want to close set chatNamesToClose to {"aolsystemmsg"} tell application "Adium" repeat with aChat in every chat set chatName to the name of aChat as text repeat with name in chatNamesToClose if name is in chatName then close aChat end if end repeat end repeat end tell