I don't know what to search for... (something about repeating inputs)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
elkym
Posts: 2
Joined: 08 May 2018, 13:22

I don't know what to search for... (something about repeating inputs)

21 Jun 2018, 12:00

I have a script which I frequently want to change.

I'd like to modify a command which will repeat 2 lines X number of times before continuing the keystroke sequence.

Example from my actual code:

--------------------------------------
^+3::
Send, {F5}
Send, N1
Send, {Enter}
Send, {Up}
Send, {Alt down}{Down}{Alt up}
Sleep, 100
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Space}
Send, {Down}
Send, {Space}
Send, {Down}
Send, {Space}
Send, {Down}
Send, {Space}
Send, {Enter}
return
--------------------------------------

Currently, I'd like to replace the section:

Send, {Down}
Send, {Space}
Send, {Down}
Send, {Space}
Send, {Down}
Send, {Space}

... with something like:

[Repeat X times:]
Send, {Down}
Send, {Space}
[End repeated section]

But I don't have the vocabulary to know what to search for.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: I don't know what to search for... (something about repeating inputs)

21 Jun 2018, 12:50

Take a look at using: Loop

Code: Select all

Loop, 2
{
    Send, {Down}
    Send, {Space}
}
HTH
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I don't know what to search for... (something about repeating inputs)

22 Jun 2018, 01:54

and maybe replace:

Code: Select all

Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
with

Code: Select all

Send, {Tab 8}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 251 guests