作者nosql (mingray/nosql)
站内EzHotKey
标题[AHK-] 使用Vista遥控器控制电脑
时间Fri Sep 12 03:00:01 2008
== 外挂连结==
http://www.autohotkey.com/forum/topic6367.html
== 使用方法 ==
把
RemoteControl.ahk 的内容复制贴上後
修改
InputMsg(wParam, lParam, msg, hwnd) 函数在
msgbox %vals% 此行後的内容
如果不注解该行
可以看到事件代码
接着可以自行加入如
ifequal, Vals, 事件代码, gosub 子程序
== 范例 ==
HP TX2506配合内建Vista MCE遥控器 (不适用於XP Tablet 2005 Orz)
<pre>
;msgbox %vals%
ifequal, Vals, 020000, gosub RemoteReleaseKey2
ifequal, Vals, 020902, gosub RemoteInfo
ifequal, Vals, 022402, gosub RemoteBack
ifequal, Vals, 02b300, gosub RemoteForward
ifequal, Vals, 02b400, gosub RemoteBackward
ifequal, Vals, 02b500, gosub RemoteNext
ifequal, Vals, 02b600, gosub RemotePrev
ifequal, Vals, 02b700, gosub RemoteStop
ifequal, Vals, 02cd00, gosub RemotePlayPause
ifequal, Vals, 02e900, gosub RemoteVolPlus
ifequal, Vals, 02e200, gosub RemoteVolMute
ifequal, Vals, 02ea00, gosub RemoteVolMinus
ifequal, Vals, 0000, gosub RemoteReleaseKey0
ifequal, Vals, 030d, gosub RemoteMediaCenter
ifequal, Vals, 0380, gosub RemoteRepeat
ifequal, Vals, 0324, gosub RemoteDVD
</pre>
下略
然後只要接子程序如
<pre>
RemoteForward:
strActiveWinTitle := GetTrueWinTitle()
if(strActiveWinTitle = "Media Player Classic")
{
Send {Ctrl down}{Right down}
Send {Ctrl up}{Right up}
}else{
;msgbox %strActiveWinTitle%
}
return
RemoteBackward:
strActiveWinTitle := GetTrueWinTitle()
if(strActiveWinTitle = "Media Player Classic")
{
Send {Ctrl down}{Left down}
Send {Ctrl up}{Left up}
}else{
;msgbox %strActiveWinTitle%
}
return
</pre>
这边是我用来帮MPC做快转用的
要配合取得标题的函数
--
-=TW Mabinogi=- -=个人网站=-
迪恩伺服器 飘月明 常出没 ch3
http://s93.tku.edu.tw/~493370067/pyms/index.htm
堤尔克那公墓招生中 Q我有mabinogi辅助计算网页
-=个人板=-
telnet://kg.twbbs.org P_mingray
telnet://bbs.kkcity.com.tw KKCity mingray
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.117.175.21