如何增加在自动热键循环中按下的选项卡数量?

时间:2018-07-27 17:34:59

标签: autohotkey

Send {Tab 33}
Send {Enter}
Sleep, 2500
Click, 235, 380
Sleep, 2500
Send {Tab 19}
Send {Enter}
Sleep, 1200
Send, ^a
Send, ^c
return

在此脚本中,我想将选项卡的数量从33增加到34、35、36 ........,而无需实际更改脚本。

我该怎么做?

我是否使用循环?

1 个答案:

答案 0 :(得分:0)

很明显,我看不到您是否通过热键触发此操作-但让我们假设是(让我在下面的示例中为Ctrl + l),您可以将其更改为:

add_product_to_bundle

我还看到您正在使用2个标签项-33和19。要增加两个标签,请执行以下操作:

global tabNumber = 33  ; the word "global" is optional, but helps make it more clear

^l::
    Send {Tab %tabNumber%}
    Send {Enter}
    Sleep, 2500
    Click, 235, 380
    Sleep, 2500
    Send {Tab 19}
    Send {Enter}
    Sleep, 1200
    Send, ^a
    Send, ^c

    tabNumber += 1
return
相关问题