Sign in to follow this  
Followers 0
Killer

Winkill don't kill explorer windows?

11 posts in this topic

I notice winclose will close explorer windows but winkill doesn't. Anyway to have winkill to close them?

Share this post


Link to post
Share on other sites



_WinKill("Explorer","")

Func _WinKill($szTitle,$szText)
   WinClose($szTitle,$szText)
EndFunc

<{POST_SNAPBACK}>

Sorry if I may ask, isn't this using Winclose? :)

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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


Who else would I be?

Share this post


Link to post
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. :)

Share this post


Link to post
Share on other sites

You still did not answer the question. Give me an answer why you can't use WinClose.


Who else would I be?

Share this post


Link to post
Share on other sites

You still did not answer the question. Give me an answer why you can't use WinClose.

<{POST_SNAPBACK}>

I want to close the window straight. Winclose will sometimes delay.

Share this post


Link to post
Share on other sites

Opt("WinWaitDelay", 0)


Who else would I be?

Share this post


Link to post
Share on other sites

I must be quick on the draw tonight.


Who else would I be?

Share this post


Link to post
Share on other sites

Inialate("Explorer","","Explorer.exe")

Func Inialate($szTitle,$szText,$szProcess)
  WinClose($szTitle,$szText)
  WinKill($szTitle,$szText)
  ProcessKill($szProcess)
EndFunc

Wont this going killing also explorer as shell?

Share this post


Link to post
Share on other sites

I guessed so, I just wanted to be sure.

Share this post


Link to post
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
Sign in to follow this  
Followers 0