以下AHK脚本会自动带来了,当你在uTorrent的图标在系统任务栏托盘右键单击你通常会得到菜单:这个AHK脚本如何工作?
DetectHiddenWindows, On
Process, Exist, utorrent.exe
WinGet, W, List, ahk_pid %ErrorLevel%
Loop %W%
{
WinGetClass, Class, % "ahk_id" W%A_Index%
If InStr(Class, "µTorrent") {
hWnd := W%A_Index%
Break
}}
PostMessage, 0x8001, 0,0x204,, ahk_id %hWnd% ; Right Click down
PostMessage, 0x8001, 0,0x205,, ahk_id %hWnd% ; Right Click Up
我了解大部分除了最后两行。 0x8001是WM_APP + 1。为什么使用WM_APP范围的消息,以及发出这两条消息时究竟发生了什么?非常感谢您的解释。
道歉捎带我的问题在这一个。这是由于某种原因关闭作为题外话,但我觉得非常类似于这个:http://stackoverflow.com/questions/12654588/disabling-windows-7s-hotkey-to-move-window-to-other-monitor如果有人有任何建议,我会非常感激。 –