UPDATE: I have added a Python-3 "reverse the clipboard text" script.
This Python-3 script caters for Unicode text; ie. all text...
# original # Ĥĕłłō ŵōŗłđ in Unicode
# reversed # edocinU ni đłŗōŵ ōłłĕĤ
Because no integrated solution has been presented (yet), I'll mention a Unix-tools work-around.
Download the utilities mentioned in the source (below), and put them into a PATH'd folder.
Pop the code (below) into a .cmd file and call it anything you like. (it to, must of course be in a PATH'd folder).
Create a Windows shortcut to the .cmd (put it somewhere in your StartMenu, and set it to run minimized)... and assighen a Shortcut-Hotkey to it.
You can then just copy the text of your choice to the clipboard and press your Hotkey... Done! .. the reversed text replaces the selected text.
If you prefer you can set up a NotePad++ macro to select and copy an entire line.. (take note of the new-line char(s) at the end of the text.
Also, as mentioned in the source notes. This workd for single-bytes character sets..
sed.exe may be able to handle Unicode, but I haven't quite worked that one out yet...
If you happen to know how to do this, please post the info, either here or perhaps in my posting of a specific qustion abut this issue: can-gnu-sed-for-windows-handle-unicode
This is the
:: FUNCTION: Reverse the text in the clipboard. ::
:: 8-bit characters only (ANSI). ::
:: It removes all \r and \n characters, because ::
:: because sed.exe adds a trailing line-feed ::
:: Four `NIX utilities are used. ::
:: 2 gclip.exe (GNU) ::
:: 1 pclip.exe (GNU) ::
:: 3 gsed.exe (GNU) ::
:: 4 tr.exe (is `NIX, but maybe not GNU) ::
> "%temp%\%n0.sed" echo /\n/!G
>> "%temp%\%n0.sed" echo s/\(.\)\(.*\n\)/^&\2\1/
>> "%temp%\%n0.sed" echo //D
>> "%temp%\%n0.sed" echo s/.//
pclip.exe | sed.exe -f "%temp%\%n0.sed" | tr.exe -d "\r\n" | gclip.exe
Here is the
## FUNCTION: Reverse the text in the clipboard. ##
## The text is handled as unicode. ##
## Using Python-3.1.2 ##
## with Python-Win32-extensions for Python-3.1 ##
import win32clipboard as w
## CF_UNICODETEXT == 13