Jump to content

Can multiple autoit exe's (appear to ) write to the same console ?


 Share

Recommended Posts

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

Link to comment
Share on other sites

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:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

8 minutes ago, water said:

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

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:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

  • Moderators

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!

Link to comment
Share on other sites

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:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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