Likewise, I'd love to kill Live Messenger when I click to close it.
I gave it a shot :
;; Kick messenger
;; by ak
CoordMode, Mouse, Screen
MouseGetPos, ClickX, ClickY, winID
Wingetclass winClass, ahk_id %winID%
Winget winPID, PID, ahk_id %winID%
if (winClass != "MSBLWindowClass")
if IsOverCloseButton(ClickX, ClickY, winID)
Process close, %winPID%
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 :