Commands & Syntax > Commands > Clipboard >

www.perfectkeyboard.com

 

PASTE - < clppastetext >() ... [Free]

 

Clipboard PASTE
<clppastetext>("Text to paste")
Available in: Free edition

The command inserts text to active application (window) through clipboard simulating the paste function. The command puts text passed as the command parameter to the clipboard and then invokes "Ctrl+V" in the active application.

 

#

Parameter name

Parameter description

1

Text to paste

Text (variable) to be pasted to destination application (document).

 

Example (Macro Steps):

 

1

<#> <#> This macro pastes "Hello!" into the Notepad

2

Macro execution: ONLY COMMANDS

3

IF WINDOW "[* - Notepad|Notepad|#46|#118]" Is Open (Match=Partial)

4

Window ACTIVATE bring "[* - Notepad|Notepad|#46|#118]" window to top (other parameters: Match = Partial, Window state = Normal, %p4_name = )

5

Clipboard PASTE Text to paste=Hello!

6

ELSE activate

7

Message SHOW "" : "'Notepad' is not opened!" (other parameters: x = 100, y = 100, Window title = Message, Buttons = OK, Timeout (seconds) = , Always on top = ).

8

ENDIF

Example (Plain Text):

 

<#> This macro pastes "Hello!" into the Notepad

<cmds>

 

<if_win>("[* - Notepad|Notepad|#46|#118]","OPEN",0)

   <actwin>("[* - Notepad|Notepad|#46|#118]",0,0)

   <clppastetext>("Hello!")

<else>

   <msg>(100,100,"'Notepad' is not opened!","Message",1)

<endif>