yton Posted May 5, 2010 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
AdmiralAlkex Posted May 5, 2010 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
funkey Posted May 5, 2010 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.
AutoBert Posted April 26, 2016 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.
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