[英]AHK Script to send different button with each successive press
好的,所以我在AHK中編寫了此腳本,在第一次按下鼠標按鈕時按下了2,在第二次按下鼠標時按下了3,依此類推,但是它不起作用。 有什么想法嗎?
XButton1 :: Send,1;
XButton2 ::
x:= 1
如果(x = 1){
發送2
x + = 1}否則,如果(x = 2){
發送3
x + = 1}否則,如果(x = 3){
發送,4
x + = 1}否則,如果(x = 4){
發送5
x = x-3}
每次按XButton2時,會將x的值重置為1 .... x:=1
。 因此,它顯然只會發送2。您需要在XButton2之外設置x的值。 這將起作用:
x := 1
XButton2::
x += 1
SendInput, %x%
return
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.