life ideas

October 23, 2006


Filed under: Uncategorized — manoftoday @ 6:30 pm


1)  simulate a close action

WinGet, window_id, ID, MSN Messenger ;  as the title name
; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE
PostMessage, 0x112, 0xF060,,, ahk_id %window_id% ; approach to simulate a click on close button


the downside is that it will mimimize to trayicon, unless the program has no tray icon.


2) by process Exit

Process, Exist, msnmsgr.exe


the downside is that it will still have a dead trayicon there, unless you manually refresh the tray window


3)  perfect approach


DetectHiddenWindows, On
Process, Exist, msnmsgr.exe
    IfWinExist, ahk_pid %pid%
         ;PostMessage, WM_CLOSE
         PostMessage, WM_QUIT
    else if A_Index>1
    ;else msgbox, No dice!


4) by send a WM_COMMAN exit command

PostMessage, 0x111, 32770,,,雅虎通


how to find 32770?

please refer…


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: