Jump to content

Recommended Posts

Posted

I'd like to see all the console output from multiple exe's, in the same place, in realtime rather than written to a log

All the sample code I've found has one program spawning a second, and showing the console output from the child process.

Is there a way to have multiple programs write to the same console ?  (Or appear to)

Thanks !

AJM

Posted

Can you post or link to an example so the OP sees how it works?
Just "Yes, it is possible" is a bit lean ;)

I do not know too much about this but I think that every exe (process) creates it's own console. To combine the output of multiple exe you would need to send them to some kind of console server using IPC.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
  On 9/25/2018 at 3:20 PM, water said:

Just "Yes, it is possible" is a bit lean ;)

Expand  

Hey water :)
I know right!
By the way, I wanted to give him just a "Yes, it is possibile", since the OP hasn't been very clear about what kind of Console he was meaning, I wanted to be generic, even because I don't have so much spare time.
So, when the OP will be clearer, I'll be less generic as well ;)

Click here to see my signature:

  Reveal hidden contents

 

  • Moderators
Posted

It is not best practice to have multiple exes writing to the same file unless you are using an application that supports multi-user access. As was mentioned you could create a third script that holds a GUI and try to capture the STDOut of the other two executables. If your true goal, however, is simply being able to see updates to a log file in real time, there are a number of easy options to accomplish this:

  • powershell get-content xxx -tail -wait
  • Enable silent update in Notepad++
  • mtail (freeware)
  • snaketail (freeware)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

i once achieved the same goal while working on a project where multiple instances of my exe were running simultaneously (each processing a small portion of a an extremely large input data).

contrary to the OP preference of avoiding a log file, i did it with just that - i had all my instances writing to the same log file (with the help of this UDF to simulate file lock). i could do post-process analysis, i could also watch the log at real time using a tail utility (some mentioned in the post just above this).

Signature - my forum contributions:

  Reveal hidden contents

 

Posted (edited)

If you don't combine the outputs logically, your output will be a garbled mess. the messages would come out as if you were shuffling 2 deck of cards into one.  you can see this for yourself by doing outputs in python with multiple threads.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...