Autohotkey 如何在AHK中将F1和F12键绑定到鼠标滚轮上下

Autohotkey 如何在AHK中将F1和F12键绑定到鼠标滚轮上下,autohotkey,Autohotkey,对于游戏,我想把F1到F12键绑定到我的鼠标滚轮上,这样我就可以滚动它们了。例如:向上滚动应给出发送F1、F2、F3等的结果,而鼠标向下滚动将发送最后一个F(i)-1。 在伪代码中: i = 1 Mousewheelup:: if(i < 12): Send F(i+1) i++ else: i = 1 Send F(i) Mousewheeldown:: if(i > 0): Send F(i-1) i-- else: i = 12 Send F(

对于游戏,我想把F1到F12键绑定到我的鼠标滚轮上,这样我就可以滚动它们了。例如:向上滚动应给出发送F1、F2、F3等的结果,而鼠标向下滚动将发送最后一个F(i)-1。 在伪代码中:

i = 1
Mousewheelup::
if(i < 12):
  Send F(i+1)
  i++
else:
  i = 1
  Send F(i)

Mousewheeldown::
if(i > 0):
  Send F(i-1)
  i--
else:
  i = 12
  Send F(i)
i=1
鼠标旋转::
如果(i<12):
发送F(i+1)
我++
其他:
i=1
发送F(i)
鼠标向下移动::
如果(i>0):
发送F(i-1)
我--
其他:
i=12
发送F(i)
类似的东西。

试试这个:

i := 0
WheelUp::
if(i < 12)
{ 
  Fn := "F" i+1  
  Send, {%Fn%}
  i++
}
else
{
  i := 1
  Fn := "F" i
  Send, {%Fn%}
}



WheelDown::
if(i > 1)
{
  Fn := "F" i-1  
  Send, {%Fn%}
  i--
}
else
{
  i := 12
  Fn := "F" i
  Send, {%Fn%}
}
i:=0
WheelUp::
如果(i<12)
{ 
Fn:=“F”i+1
发送,{%Fn%}
我++
}
其他的
{
i:=1
Fn:=“F”i
发送,{%Fn%}
}
向下推:
如果(i>1)
{
Fn:=“F”i-1
发送,{%Fn%}
我--
}
其他的
{
i:=12
Fn:=“F”i
发送,{%Fn%}
}

不幸的是,它在暗黑破坏神2中不起作用,我不确定它是否一直发送相同的F热键而不是全部热键