Author Topic: Tool Properties: replace text with output from external tool  (Read 968 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Tool Properties: replace text with output from external tool
« on: December 04, 2008, 11:03:55 pm »
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 News On Twitter: http://twitter.com/hippoedit/)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Tool Properties: replace text with output from external tool
« Reply #1 on: December 05, 2008, 02:05:14 pm »
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.

 

Related Topics

  Subject / Started by Replies Last post
15 Replies
2710 Views
Last post April 28, 2009, 12:25:01 am
by alex
18 Replies
2960 Views
Last post February 23, 2009, 06:15:27 pm
by alex
4 Replies
2071 Views
Last post April 18, 2009, 12:14:34 pm
by Stefan
3 Replies
469 Views
Last post June 29, 2009, 08:34:29 am
by alex
0 Replies
566 Views
Last post November 09, 2009, 10:14:11 am
by alex