AutoHotkey - 如何使用3种不同的组合?

时间:2013-05-02 07:35:12

标签: scroll autohotkey

我想使用这三个热键:
- 左移和向下滚动两次向下滚动 - 左控制和向下滚动向下滚动4次
- 左移和左控制和向下滚动向下滚动8次

这是我到目前为止所做的,但当我输入命令时没有任何事情发生

Lshift & wheeldown:: 
GetKeyState,state1,LShift
GetKeyState,state2,LControl
if (state1 = d) and (state2 = u)
   send {wheeldown 2}
if (state2 = d) and (state1 = u)
   send {wheeldown 4}
if (state1 = d) and (state2 = d)
   send {wheeldown 8}
return

1 个答案:

答案 0 :(得分:2)

在超级用户中查看我的相同答案

我会这样做:

$+WheelDown::SendInput, {WheelDown 2}
$^WheelDown::SendInput, {WheelDown 4}
$+^WheelDown::SendInput, {WheelDown 8}

$ sign是为了防止SendInput wheeldown可能会反复触发相同脚本的循环,因为用户已经拥有一个修饰键。