I have a Chromium based software that is really buggy, for some reason some windows of that process become unkillable, I can move them around but I cannot close them.
I've tried to use winclose and winkill in AHK but it doesn't work (while the script correctly works on other windows). I've also tried the script below but it closes all the windows of the process. I don't know any language besides AHK and Python and maybe I need to use a low-level language
i::
MouseGetPos,,, id
MsgBox, The window ID under the mouse is: %id%
WinGet, pid, PID, ahk_id %id%
hProcess := DllCall("OpenProcess", "UInt", 1, "Int", 0, "UInt", pid, "Ptr")
DllCall("ntdll\NtTerminateProcess", "ptr", hProcess, "UInt", 0)
DllCall("CloseHandle", "ptr", hProcess)
return
I have a Chromium based software that is really buggy, for some reason some windows of that process become unkillable, I can move them around but I cannot close them.
I've tried to use winclose and winkill in AHK but it doesn't work (while the script correctly works on other windows). I've also tried the script below but it closes all the windows of the process. I don't know any language besides AHK and Python and maybe I need to use a low-level language
i::
MouseGetPos,,, id
MsgBox, The window ID under the mouse is: %id%
WinGet, pid, PID, ahk_id %id%
hProcess := DllCall("OpenProcess", "UInt", 1, "Int", 0, "UInt", pid, "Ptr")
DllCall("ntdll\NtTerminateProcess", "ptr", hProcess, "UInt", 0)
DllCall("CloseHandle", "ptr", hProcess)
return
Share
Improve this question
asked Mar 13 at 4:21
Heavy MaskHeavy Mask
1
1
|
1 Answer
Reset to default 0@Heavy Mask
Wanted to thank you for this. I don't know if you ever found a solution, but your script inspired me to create the below script. Might be able to use it yourself?
;;∙============================================================∙
#NoEnv
#Persistent
#SingleInstance, Force
SetBatchLines, -1
SetTitleMatchMode 2
SetWinDelay, 0
^!LButton:: ;;∙------∙
WinHide ahk_id %id%
if the hidden window doesn't have any influence on the rest of the app. – Relax Commented Mar 13 at 9:28