Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TLMDShellConsoleView - How to keep the console app running?

I'm using TLMDShellConsoleView.   I've managed to get my application to start a console app (which is a UCI chess engine).  However, as soon as the console app is started it seems to be killed.  The console app doesn't normally do this until it received the "quit" command.  So the question is, how do I keep the app running?  I'd basically like to use the component to "control" the app (in this case a chess engine) - is this possible?

Thanks,

Steve

Comments

  • 6 Comments sorted by Votes Date Added
  • Hi Steve,

    I do not observe such an "autokilling" behaviour. I checked this with bat files as well as console applications.
    To help you in this situation, I have to know what your dos app does and what kind of control do you want - is it just start/stop or you want send input to your dos app?

    Best regards,
    Victor Bocharov
    bocharov@lmd.de
    LMD Innovative 

  • Hi Victor,

    I was wanting to send input to the dos app.  

    Any UCI engine will suffice for the test.  Take for example Monarch (my own engine) www.monarchchess.com .  After the engine starts send the command "uci" and the engine should respond.

    Best regards,

    Steve


  • Hi Steve,

    There are some issues in redirecting input for TLMDShellConsoleView, but there is a workaround.
    You can use TLMDSendKeys component to send input to your dos app: 

    procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char);
    begin
        LMDSendKeys1.AppActivate(LMDShellConsoleView1.CommandLine);
        LMDSendKeys1.SendKeys(string(Key));
    end;


  • Hi Victor,

    Thanks!  I'll give it a try.  It would be great if the issues could be fixed!

    Thanks,

    Steve
  • Hmmmm, TLMDSendKey is not part of the LMDShell Pack (the only pack I have) so the work around will not work  :((

    Steve
Sign In or Register to comment.