Jump to content

* * * * - 1 votes

[tool] captConsole

  • Please log in to reply
1 reply to this topic

#1 pscEx


    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
    European Union

Posted 20 February 2008 - 01:55 PM

Some days ago there has been a question how to pass info from an external app to WinBuilder.

This tool is intended to enhance WinBuilder's ShellExecute command.
It starts the external app and writes the console output and the exit code into an ini file.

captConsole {/|-}[:]C<command line> {/|-}T[:]<target ini file> [{/|-}S[:]<section>] [{/|-}O[:]<console output key>] [{/|-}E[:]<exit key>] [{/|-}N[:]<new line>]
<new line> replaces the output's new line char
default <section>: 'captConsole'
default <console output key>: 'ConsoleOutput'
default <exit key>: 'ExitCode'

Use in WB could be:
ShellExecute,Hide,%Tools%\captConsole.exe,"#$q-C:chkdsk ?#$q %ProjectInfo%"

The sample has a bad syntax. Therfore the result looks like (on my German system):

ConsoleOutput=Laufwerk, Pfad oder Dateiname ist ungültig.

Maybe you want to add this feature to your ShellExec command, to automatically fill internal variables %conout% and %exitcode%
There is only a simple call like

 exit &#58;= captureOutput&#40;command, conBuffer&#41;;

  conBuffer&#58; AnsiString;

 exit&#58; DWORD;

 command&#58; <command> + &#39; &#39; + <parameters> of ShellExecute


Attached File  captConsole.zip   41.83KB   269 downloads

#2 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10557 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
    European Union

Posted 20 February 2008 - 09:08 PM

Hi Peter - very good tool!

I've added your request on the bugtracker: http://www.boot-land...?...&showbug=33


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users