I want a script that will close windows whose name contiains different text. For example, I may have 3 windows that have differnet names, but they all contain the word “isight” in them. Rather than listing every name in the script, I wanted to make a flexible with a variable. That way, it will close all window with the contained text “isight”. This is what I have, but I am getting an error. Any ideas?
tell application "iChat"
set windownames to name of windows
close (window whose windownames contains "Buddy ")
end tell