Commands & Syntax > Commands > Macro Flow Control >

www.perfectkeyboard.com

 

Repeat steps END - < for_end > ... [Pro]

 

Repeat steps END
<for_end>
Available in: Professional edition

This command ends the repeat section. See also "for" command.

 

 

Example (Macro Steps):

 

1

<#> <#> This macro shows how to use "for" loop.

2

<#> <#> There are two embedded "for" loops.

3

<#> <#>

4

Macro execution: ONLY COMMANDS

5

Repeat steps UNTIL "vX < 5" (Counter variable initial value = "vX=1", Counter loop increment = "1")

6

Repeat steps UNTIL "vY < 5" (Counter variable initial value = "vY=1", Counter loop increment = "1")

7

Message SHOW "Information" : "Counters [x,y] = [%vX%,%vY%] Press 'F10' to exit this macro." (other parameters: x = -100, y = -100, Window title = For Counters, Buttons = None, Timeout (seconds) = 0, Always on top = ).

8

Error message DISABLED

9

WAIT FOR Object = "KEY", Event = "PRESS", Parameter = "", Timeout (seconds) = "1", Exact = "0"

10

Error CLEAR

11

Error message ENABLED

12

If KEY / MOUSE BUTTON "" is "Down" then execute following steps

13

Macro EXIT

14

ENDIF

15

Repeat steps END

16

Repeat steps END

Example (Plain Text):

 

<#> This macro shows how to use "for" loop.

<#> There are two embedded "for" loops.

<#>

<cmds>

 

<for>("vX=1","vX < 5","1")

 

<for>("vY=1","vY < 5","1")

 

<msg>(-100,-100,"Counters [x,y] = [%vX%,%vY%]

 

Press 'F10' to exit this macro.","For Counters",0,0,0)

 

<me_error_nodisplay> <waitfor>("KEY","PRESS","<F10>",1,0)<me_error_clear><me_error_display>

 

<if_key>("<F10>","DOWN")

<exitmacro>

<endif>

 

<for_end>

 

<for_end>