| || |
Close an unknown number of identical windows
I wanna close an unknown number of Shells with identical titles (of course not identical tags, they are trailed by "[nr]")
How can i do this?
I´ve tried the "FindWindowA()" - function from the (WINDOWS) - user23.dll, which returns a handle to one of these windows.
But I don`t know how to work with this handle.
Re: Close an unknown number of identical windows
You may do like the following:
For ex. we have a set of MainWin windows which have tags like "Main window[nr]". To close them all we may use the following code
<font class="small">Code:</font><hr /><pre>
[+] while ( MainWin("Main window").Exists() )
[ ] MainWin("Main window").SetActive()
[ ] MainWin("Main window").Close()
This is only example. There may be exception handling added or some other checkings including synchronization. Tag "Main window" means that this is the first window in queue which may be described by tag "Main window"