Jump to content

Winkill don't kill explorer windows?


Killer
 Share

Recommended Posts

Ah, come on Larry, I know you can do better than that :)

Since Explorer windows seem to be classname "CabinetWClass" on the computer I tested, you could try the following UDF:

Func _WinKill($title, $text)
   Local $opt = Opt("WinTitleMatchMode", 4);advanced
   Local $handle = WinGetHandle("classname=CabinetWClass")
   If $handle = WinGetHandle($title, $text) Then
      WinClose($handle)
   Else
      WinKill($title, $text)
   EndIf
   Opt("WinTitleMatchMode", $opt);restore match mode
EndFunc
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

@Killer, what is your problem? Why can't you use WinClose? Are you making some type of sick joke?

<{POST_SNAPBACK}>

Don't assume when someone needs to do something you are assuming they are going to do some jokes or virus type of process. I am an administrator and trying to stop unauthorised program from running. :)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...