sotl Posted January 27, 2007 Share Posted January 27, 2007 (edited) Hello, I've been coming here as a resource for a while and have always found a solution through searching, but since I haven't found the solution for my newest obstacle I ask:Is is possible to use stdoutread on an existing DOS window which wasn't initially opened by autoit?My boss wants me to make a script which will monitor 4 DOS windows on our server which are needed for day to day operations. When these programs crash they display an error message inside of them. I want to make the error message trigger an email notification.I can get the pid with WinGetProcess, but from what I've seen in the searches it seems as though my script has to start the windows initially with a flag of 2 for stdoutread to work. Is there another way around? Is there another command I can use?Thank you in advanceOfftopic: And I'd like to say that AutoIT rocks. We now can startup and shutdown applications/video projectors on various computers throughout our network at the push of a button from one machine. Thank you AU3 devs. Edited January 27, 2007 by sotl Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 I think you have to resort to some C/C++ to get it right. Try to search for something called stub.exe (stub.zip) by @valik. I have found the source in the forume before. A search like this should also give you several threads discussing the topic. Happy hunting. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
sotl Posted January 27, 2007 Author Share Posted January 27, 2007 (edited) C/C++ ... aww man. well.. thanks for the info. Edited January 27, 2007 by sotl Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 hmm, just a nother thought. Can't you monitor for the crashed process? Or does it continue to live? Or is it a script? Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
sotl Posted January 27, 2007 Author Share Posted January 27, 2007 (edited) I wish the darn thing would crash and disappear.. then it would be soo easy (If winexists(...) = false). But the thing continues living and just changes its text to say error. it has a dos type gui inside of it. Our system uses SMS (Springer Miller Systems) if you are familiar with it. It's really old and DOS based. edit: btw thanks for the quick responses! Edited January 27, 2007 by sotl Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 Supose your out of luck then.. Sometimes it is possible to capture the thing with tee, in core utils, from gnuwin32. But then you have to be able to control how the apps are started. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Bert Posted January 27, 2007 Share Posted January 27, 2007 I'm not that good at this sort of thing, but is it possible to so a edit>mark, then capture all the text on the screen? once you have it in the clipboard, you could then read what is there. Its messy, but it may work. You could have it loop every so often to do this for each DOS window. I looked around, and I see what you mean on your problem. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Uten Posted January 27, 2007 Share Posted January 27, 2007 Forgot that one. The old ALT+SPACE->E->S->ENTER trick. Nice @volly.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Bert Posted January 27, 2007 Share Posted January 27, 2007 It would be nice to have a tool to do just what this problem calls for...I've seen several post in the past ask for this sort of thing. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
sotl Posted January 27, 2007 Author Share Posted January 27, 2007 I'm not that good at this sort of thing, but is it possible to so a edit>mark, then capture all the text on the screen? once you have it in the clipboard, you could then read what is there. Its messy, but it may work. You could have it loop every so often to do this for each DOS window. I looked around, and I see what you mean on your problem.Dude... you == that might just work. Link to comment Share on other sites More sharing options...
dannyk Posted April 3, 2009 Share Posted April 3, 2009 Forgot that one. The old ALT+SPACE->E->S->ENTER trick. Nice @volly..Messy, but much better than waiting some specified time before sending your input. This helps me tremendously until someone can come up with something better. Thanks for sharing. 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