>How would I close specific windows using WSH? The window title is a given.
AFAIK, the WSH doesn't provide a COM wrapper for this functionality. You have to use the WinAPI directly. Erik Moore has a write up on how to do this in the API section. Here is an example (paraphrased):
#DEFINE WM_CLOSE 0x10
declare integer FindWindow in "user32" string lpclass, string lptitle
declare integer SendMessageA in "user32" as "SendMessage" integer hwnd, integer wMsg, integer wParam, integer lParam
lnwnd = FindWindow(.NULL.,MyWindowTitleHere)
if lnwnd > 0 then
=SendMessage(lnwnd,WM_CLOSE, 0, 0)
else
wait 'Unable to find window' window
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao