yton 0 Posted May 5, 2010 Greetings,Opt("WinTitleMatchMode", 2) If WinExists("Firefox") Then $hwnd = WinGetHandle("Firefox") WinClose($hwnd) EndIfit works for 1 window onlywhat changes should I do in order to close multiple firefox windows?thank you Share this post Link to post Share on other sites
AdmiralAlkex 126 Posted May 5, 2010 Use WinList to get all handles and close with them .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
funkey 128 Posted May 5, 2010 Opt("WinTitleMatchMode", 2) $aList = WinList("Firefox") For $i = 1 To $aList[0][0] WinClose($aList[$i][1]) Next Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Share this post Link to post Share on other sites
kavyap12 0 Posted April 26, 2016 how to close all except first oneĀ Share this post Link to post Share on other sites
AutoBert 197 Posted April 26, 2016 Just use For $i = 2 To $aList[0][0] instead of For $i = 1 To $aList[0][0] then the first firefox in the list will not be closed. Share this post Link to post Share on other sites