(How does one create a poll?)
OK, I'm thinking out loud here, so please bear with me or ignore :) Here's a scenario I've had to contend with countless times. I'm translating a large document that contains innumerable specifications, such as power consumption, capacity, operating temperatures, dimensions, weight etc. So, lots of numbers. When translating between English and Polish it involves endless tweaking of punctuation. English "1.5" becomes "1,5" in Polish (decimal separator). English 12,000 becomes "12<non-breaking-space>000" in Polish (thousands separator). Then there are other little tweaks of spacing (we don't put a space before the degree ° sign, for example) and units of measure. You can imagine it gets tedious quickly. Today I've gone though well over a hundred of such lines.
This needs to be
automated, and implemented in such a way that it works with
any text editing application. Plus, the solution needs to be abstracted enough to be
generally useful.
For a long time I've looked for an excuse to write an app that executes user-created scripts. (At the moment there seems to be a dearth of Delphi scripting solutions that handle Unicode, so this might present a big obstacle, but right now I want to think positive for once :-) Would this be useful at all? Here's what I'm imagining:
1) You press a hotkey, and the as-yet-unnamed app acquires text from the application you are working in. This can be done via the clipboard or (better, harder) by accessing the text directly. So the app grabs the text and:
2) executes a script that you preselected when starting your work. In my case the script would do the appropriate replacements on the various numeric values, but it could do anything. Then:
3) the app puts the result back on clipboard or injects it directly into your editor.
Questions:
So, does this seem like a worthwhile standalone project? Assume the app does nothing else except the points above.
What existing solutions could be used to achieve the same goal? I suppose AHK could be coerced to do that. Anything else? Is it even remotely interesting?
(Yes, I've considered adding this to
Echo, but I am not convinced it's a good idea. For one thing, Echo would be capturing the clipboard and modifying its contents nearly instantly, and that would play badly with other apps that monitor the clipboard. In general, I think it'd create a mess, but I haven't excluded that route just yet.)