Killer Posted November 25, 2004 Posted November 25, 2004 I notice winclose will close explorer windows but winkill doesn't. Anyway to have winkill to close them?
Killer Posted November 25, 2004 Author Posted November 25, 2004 _WinKill("Explorer","") Func _WinKill($szTitle,$szText) WinClose($szTitle,$szText) EndFunc<{POST_SNAPBACK}>Sorry if I may ask, isn't this using Winclose?
CyberSlug Posted November 25, 2004 Posted November 25, 2004 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!
this-is-me Posted November 25, 2004 Posted November 25, 2004 @Killer, what is your problem? Why can't you use WinClose? Are you making some type of sick joke? Who else would I be?
Killer Posted November 25, 2004 Author Posted November 25, 2004 @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.
this-is-me Posted November 25, 2004 Posted November 25, 2004 You still did not answer the question. Give me an answer why you can't use WinClose. Who else would I be?
Killer Posted November 25, 2004 Author Posted November 25, 2004 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.
this-is-me Posted November 25, 2004 Posted November 25, 2004 Opt("WinWaitDelay", 0) Who else would I be?
this-is-me Posted November 25, 2004 Posted November 25, 2004 I must be quick on the draw tonight. Who else would I be?
ezzetabi Posted November 25, 2004 Posted November 25, 2004 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?
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