Test if clipboard contains text

Share your macros, knowledge, solutions, services, ...
Post Reply
Petr
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

Test if clipboard contains text

Post by Petr » Wed Nov 23, 2016 6:18 pm

This macro shows how to test if clipboard contains text data.

Code: Select all

<#> Start of the macro
<cmds>

<#> Assign only text from clipboard to variable vClipboardText
<var_oper>(vClipboardText,"",GET_TEXT_FROM_CLIPBOARD,"","", "0")

<#> Is any text in variable vClipboardText
<if_str>("vClipboardText==_vStrEmpty")

   <#> If no, show message
   <msg>(-100,-100,"There is NO text in clipboard. ","Message",1)

<else>

   <#> If yes, show message with content of clipboard
   <msg>(-100,-100,"There is this text in clipboard:
   %vClipboardText%","Message",1)
<endif>

<#> End of the macro

Post Reply