Commands & Syntax > Commands > Macro Flow Control >

www.perfectkeyboard.com

 

Jump TO - < goto >() ... [Pro]

 

Jump TO
<goto>("Label")
Available in: Professional edition

Jump to a step defined by Jump TARGET ("label") command in the macro and continue macro execution from this step.

 

#

Parameter name

Parameter description

1

Label

Name of the target step to jump to.

 

Example (Macro Steps):

 

1

<#> <#> This macro shows how to jump to defined step in the macro

2

Macro execution: ONLY COMMANDS

3

Variable SET "vNumOfLoops=", Message text="Insert number of loops (less than 25)"

4

IF NUMERIC vNumOfLoops>=25

5

Message SHOW "" : "Too many loops, jumping to the end." (other parameters: x = 100, y = 100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

6

Jump TO "END"

7

ENDIF

8

Loop BEGIN Repeat = vNumOfLoops

9

Message SHOW "" : "_vLoopCounter" (other parameters: x = -100, y = -100, Window title = Loop, Buttons = None, Timeout (seconds) = , Always on top = ).

10

WAIT wait "200" ms (time is constant: "")

11

Loop END

12

Jump TARGET "END"

Example (Plain Text):

 

<#> This macro shows how to jump to defined step in the macro

<#>

<cmds>

<varset>("vNumOfLoops=","Insert number of loops (less than 25)")

<if_num>("vNumOfLoops>=25")

   <msg>(100,100,"Too many loops, jumping to the end.","Message",1)

   <goto>("END")

<endif>

<begloop>(vNumOfLoops)

   <msg>(-100,-100,"_vLoopCounter","Loop",0)

   <wx>(200)

<endloop>

 

<label>("END")