Tool Properties: replace text with output from external tool

Started by Stefan, December 04, 2008, 11:03:55 PM

Previous topic - Next topic

Stefan

Tool Properties: replace text with output from external tool

I would like to suggest an option for tools
to catch the output of an command line tool
and replace the text in current open document (or the selected part)
with this output.

Scenario:
- select some text
- launch external tool with arg  "/par /ame /ters %SurroundedText%"
- catch the return from this tool
- and replace text in document

Extern tool could be DOS/UNIX Tools like sort.exe, sed, awk which use stdout/stdin
or an script like VBS or AKH or AutoIt script or even an batch.

Return could also be an error message from system or tool... that would be our fault.


-------

I would also suggest two options like run-before and run-after launch tool
to f.ex. copy text from and to clipboard

- Run-Before: copy selected text to clipboard
- launch script, which reads the clipboard and format this text, then put it back to clipboard
- Run-After: read clipboard and replace text in current document

OK, thinking more about this.... i mean this could be done by user himself ;D
Forgot this please.

----
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

thanks a for a suggestion for a feature. It was already on my list, but havent time yet to do it. But definitly would do. Not for 1.40, because it is not so simple. But maybe for 1.50.
I also plannig to have output interpreter, that can accept input (something like command console).

And about RunBefore, RunAfter as you have wrote, it is possible to achive such result by using external script (bat or vbs for example) and pass arfuments to it. Generally, I dont want to make tool configuration too complex, that it would be easy for novice. I think for such complex scenarios, Hippoedit need scripting support, which is also planned. But not for 1.50.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]