User Submitted Macro

Count Clipboard Characterrs

Written by Jim Sabean, www.thatjimguy.com

What it does

Counts the number of characters in the clipboard.

This is useful for pre-checking the length of your text before posting it to social networking sites which have a limit on the number of characters allowed in a post. For example, Twitter has a limit of 140 characters and sites where you can write a review are often limited to 1000 characters.

To install

Download the file umcountclipboardchars.mex and save it to your hard drive where you store your macro file(s). Open this macro file or import the macro into your existing macro file by clicking File, Import, Import Macros.

To use

Before running this macro, copy the text that you want to count to the clipboard. You can run the macro from within Macro Express or by pressing the hotkey Ctrl+Alt+Shift+C.

How it works

This macro reads the text from the clipboard and counts the number of characters in the text. It returns a dialog box with the original text and count.

Limitations

This macro works with text in ISO-8859-1 and UTF-8 formats. New lines count as TWO characters (CR/LF = carriage return/line feed). This macro will not work correctly with unicode and languages that use more than one byte per character. Jim says, “Please contact me if you wish support for these languages.”

Requirements

Macro Express 3.5 or later

** Jim will receive a Macro Express T-shirt because we used his macro.