yton Posted May 5, 2010 Share 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 5, 2010 Share 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 Link to comment Share on other sites More sharing options...
funkey Posted May 5, 2010 Share 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. Link to comment Share on other sites More sharing options...
yton Posted May 6, 2010 Author Share Posted May 6, 2010 thank you so much ) Link to comment Share on other sites More sharing options...
kavyap12 Posted April 26, 2016 Share Posted April 26, 2016 how to close all except first oneĀ Link to comment Share on other sites More sharing options...
AutoBert Posted April 26, 2016 Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now