Commands & Syntax > Commands > Macro Flow Control >

www.perfectkeyboard.com

 

ENDIF - < endif > ... [Free]

 

ENDIF
<endif>
Available in: Free edition

The command closes conditional block of macro steps. The command can be only use together with one of an "if" command.

 

 

Example (Macro Steps):

 

1

<#> <#> This example shows how to use "if" command.

2

Macro execution: ONLY COMMANDS

3

Variable SET "vNum=", Message text="Type a number:"

4

IF 100<(30+%vNum%)

5

Message SHOW "Information" : "Yes, this is true: 100<30+%vNum%" (other parameters: x = -100, y = -100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

6

ELSE activate

7

Message SHOW "Error" : "No, it is not true: 100<30+%vNum%" (other parameters: x = -100, y = -100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

8

ENDIF

Example (Plain Text):

 

<#> This example shows how to use "if" command.

<#>

<cmds>

<varset>("vNum=","Type a number:")

<if>("100<(30+%vNum%)")

<msg>(-100,-100,"Yes, this is true: 100<30+%vNum%","Message",1,,0)

<else>

<msg>(-100,-100,"No, it is not true: 100<30+%vNum%","Message",1,,2)

<endif>