Main Area and Open Discussion > General Software Discussion
Autoreplace in clipboard
rjbull:
That is: is there a freeware app that would replace the text in the clipboard with something else? It would be nice if it did just that, I am not in need of a bloated clipboard manager. Ease of adding of new entries and flexibility (regexp?) would be an added benefit...
-Jabberwock (October 07, 2007, 02:50 PM)
--- End quote ---
Jabberwock,
I just confected a possible solution - but you may not like it, and some assembly required.
* Download ClipText from Horst Schaeffer's Web site, from the 32-bit Windows command-line tools section.
* Install this batch file somewhere on your system:
@echo off
for %%a in (1 2) do if exist c:\temp\cliptext.%%a del c:\temp\cliptext.%%a > nul
c:\dos\utils\cliptext.exe to c:\temp\cliptext.1
c:\dos\utils\sed-359.exe -f c:\pcw\spellchk\chs.sed < c:\temp\cliptext.1 > c:\temp\cliptext.2
c:\dos\utils\cliptext.exe from c:\temp\cliptext.2
for %%a in (1 2) do if exist c:\temp\cliptext.%%a del c:\temp\cliptext.%%a > nul
* Adjust paths as necessary. Make a shortcut to it, and assign a hotkey. I couldn't get this to work by assigning a shortcut in Windows itself, so I used PowerPro instead, which gives a wider choice of hotkeys, and allows you to set things to run hidden. You may have your own favourite hotkey program.
* Clip your text, press hotkey, press Ctrl-V...
I used SED 3.59 because it too is a 32-bit command-line tool, and being a version of SED, uses regular expressions. You can get a copy from Eric Pement's SED page
I admit "ease of adding new entries" is not so seamless, but suggest you assign your search-replace file, CHS.SED in the example above, as a favourite file in your editor. I mostly use TED Notepad for this kind of thing (I prefer my old WordStar-style DOS editor, VDE, for text-bashing, but that's another story).
mouser:
rj, i was thinking i could enhance the formatting preset sytem and solve the problem you point out as well by doing this:
Add an option WITHIN the existing formatting presets to invoke a tool on the clip text IN ADDITION to performing the formatting options specified.
that is, right now you can either use an external tool, OR use the built-in system. but what if i add running a tool to the choices of things you can do normally in a formatting preset. this would let you add them to the pop-up menu like any normal formatting preset, and make it easier to combine both the built in functions with external tools.
rjbull:
what if i add running a tool to the choices of things you can do normally in a formatting preset.
-mouser (October 10, 2007, 10:47 AM)
--- End quote ---
Not sure I fully understand you, but to the extent that I do, yes, that sounds good. Thanks! :)
cranioscopical:
what if i add running a tool to the choices of things you can do normally in a formatting preset
-mouser (October 10, 2007, 10:47 AM)
--- End quote ---
Sounds good to me, also. If the preset performs no other action, then you have the external tool only. In a sense, there's an inbuilt three-way switch; preset, tool, both.
mouser:
exactly.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version