Friday, October 14, 2011

Close all Browsers Opened Except QC

Dim intIndex
Set oDesc=Description.Create
oDesc("micclass").Value="Browser"
intIndex=0
While Browser("micclass:=Browser","index:="&intIndex).exist(0) and intIndex<Desktop.ChildObjects(oDesc).count
If instr(1, Browser("micclass:=Browser","index:="&intIndex).getRoProperty("name"),"Quality Center") = 0 Then
SystemUtil.CloseProcessByHwnd( Browser("micclass:=Browser","index:="&intIndex).getRoProperty("hwnd"))
else
intIndex=intIndex+1
End if
wend

No comments:

Post a Comment