Likewise, I'd love to kill Live Messenger when I click to close it.-aidan_cage
I gave it a shot :
;; Kick messenger
;; by ak
~LButton::
SetBatchLines, -1
CoordMode, Mouse, Screen
SetMouseDelay, -1
SetKeyDelay, -1
MouseGetPos, ClickX, ClickY, winID
Wingetclass winClass, ahk_id %winID%
Winget winPID, PID, ahk_id %winID%
if (winClass != "MSBLWindowClass")
return
if IsOverCloseButton(ClickX, ClickY, winID)
Process close, %winPID%
return
IsOverCloseButton(x, y, hWnd)
{
SendMessage, 0x84,, (x & 0xFFFF) | (y & 0xFFFF) << 16,, ahk_id %hWnd%
return (ErrorLevel == 20)
}
It works on my computer. It kills Live Messenger's process when you click its close button. The only problem with killing the process is that Messenger's tray icon stays visible (until you hover it with your mouse). At least that's what it does on my XP.
EXE version here :