AJMegaughin Posted September 25, 2018 Share Posted September 25, 2018 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 More sharing options...
FrancescoDiMuro Posted September 25, 2018 Share Posted September 25, 2018 @AJMegaughin Yes, it is possible By the way, you can do it via GUI either, creating your custom console, instead of using Command Prompt. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Danp2 Posted September 25, 2018 Share Posted September 25, 2018 How about using OutputDebugString? https://www.autoitscript.com/wiki/FAQ#OutputDebugString_native_call Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
water Posted September 25, 2018 Share Posted September 25, 2018 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 25, 2018 Share Posted September 25, 2018 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: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 25, 2018 Moderators Share Posted September 25, 2018 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 More sharing options...
orbs Posted September 25, 2018 Share Posted September 25, 2018 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 More sharing options...
jdelaney Posted September 25, 2018 Share Posted September 25, 2018 (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 September 25, 2018 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now