Convert text in clipboard to upper case

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

Convert text in clipboard to upper case

Post by Petr » Fri Nov 25, 2016 11:56 am

This macro converts plain text in clipboard to upper case.

Code: Select all

<#> Start of the macro
<cmds>

<#> Assign clipboard data to variable vClipboardText
<var_oper>(vClipboardText,"",GET_TEXT_FROM_CLIPBOARD,"","", "0")

<#> Are data text?
<if_str>("vClipboardText!=_vStrEmpty")

   <#> Convert data to uppercase
   <var_oper>(vClipboardText,"%vClipboardText%",STR_UPPER,"","", "0")

   <#> put data back to clipboard
   <clpput>("vClipboardText")

<else>

   <#> Clipboard is empty, or data are not text (picture...).
   <msg>(-100,-100,"No text data in clipboard.","Message",1)

<endif>

<#> End of the macro

Post Reply