※ 引述《bodhi (????)》之銘言:
: : if (GetKeyState("down")) {
: ^^^這down後面沒有模式參數 是指down down嗎?
GetKeyState 的文件
https://www.autohotkey.com/docs/commands/GetKeyState.htm
GetKeyState("down") 是用來取得「down」鍵是否被按下。
如果是按下的狀態就回傳 1,否則就回傳 0。
GetKeyState 可以接受第二個變數,如果設成 "P",它會取得按鍵的「物理狀態」
例如,按住 a,接著 Send {a up}
這時 a 在物理狀態是按下,邏輯狀態是放開
: 如果只是確認down的發送狀態 那無論有沒有按 都直接send {xx up}的話
: 會不會甚麼缺點? 會比較慢? 還是?
就變成按住 up 時會一直連發 down up,是否會比較慢我不清楚
: : Send {down up}
: 如果改用sendinput有沒有甚麼缺點?
沒有,如果想要改變 Send 的方式,可以用 SendMode 指令
https://www.autohotkey.com/docs/commands/SendMode.htm
: a::b這種標準的remap 實際上是用send發送的嗎?
嚴格來說是 Send {Blind}
{Blind} 的用途可以參考
https://www.autohotkey.com/docs/commands/Send.htm
裡面同時有介紹 SendInput / SendEvent / SendPlay 的差異