Commands & Syntax > Commands > Macro Flow Control >

IF CLIPBOARD - < if_clp >() ... [Pro]

www.perfectkeyboard.com

 

IF CLIPBOARD
<if_clp>("Condition","Unused")
Available in: Professional edition

The command evaluates the clipboard specific condition and if it is evaluated as "true" then following macro steps (steps between "if" and "else/endif") are executed.

 

#

Parameter name

Parameter description

1

Condition

Condition can be one from the following:
"EMPTY" - the condition is true if the clipboard is empty.
"SET" - the condition is true if the clipboard contains some data.

2

Unused

Must be empty.

 

Example (Macro Steps):

 

1

<#> <#> This macro shows how to use if-clp command

2

Macro execution: ONLY COMMANDS

3

IF CLIPBOARD "Is Empty"

4

Message SHOW "" : "Clipboard is empty." (other parameters: x = 100, y = 100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

5

ELSE activate

6

Variable SET "vEmpty=YES/NO", Message text="Clipboard is not empty. Do you want to empty it now?"

7

IF STRING vEmpty==YES

8

Clipboard CLEAR

9

ENDIF

10

ENDIF

Example (Plain Text):

 

<#> This macro shows how to use if-clp command

<#>

<cmds>

<if_clp>("EMPTY","")

   <msg>(100,100,"Clipboard is empty.","Message",1)

<else>

   <varset>("vEmpty=YES/NO","Clipboard is not empty. Do you want to empty it now?")

   <if_str>("vEmpty==YES")

      <clpempty>

   <endif>

<endif>