RAMzor Posted January 12, 2008 Share Posted January 12, 2008 Hello! How can I read/write information from/to DOS aplication opened in DOS window. I will create windows shell for old DOS program (eng. calculation) Example of window attached Link to comment Share on other sites More sharing options...
ResNullius Posted January 12, 2008 Share Posted January 12, 2008 Hello!How can I read/write information from/to DOS aplication opened in DOS window.I will create windows shell for old DOS program (eng. calculation)Example of window attachedHave you checked out StdOutRead() and StdinWrite() ? Link to comment Share on other sites More sharing options...
RAMzor Posted January 13, 2008 Author Share Posted January 13, 2008 (edited) Yes! But the StdOutRead() function pause the script Probably no characters to be read from the stream. Edited January 13, 2008 by RAMzor Link to comment Share on other sites More sharing options...
The Kandie Man Posted January 13, 2008 Share Posted January 13, 2008 Yes! But the StdOutRead() function pause the script Probably no characters to be read from the stream.From the help file under the StdOutRead function's remarks:If at any time when this function is called (except for "peeking" as described below) there are no characters to be read from the stream, the StdoutRead function will block (pause) and not return until there are characters to be read from the stream.Set the third parameter to true so that it only peeks at the stream and returns immediately.- The Kandie Man ;-) "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
RAMzor Posted January 13, 2008 Author Share Posted January 13, 2008 ... Set the third parameter to true ...- The Kandie Man ;-)It's not work, probably this function will not work in general with this DOS aplication. Any another idea?How can I select and copy to clipboard all data in DOS window? Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 13, 2008 Share Posted January 13, 2008 Hi, not a very good soultion, but ... Opt('WinTitleMatchMode', 2) Global $title = 'C:\WINNT\system32\cmd.exe' Run('cmd.exe', '', @SW_HIDE) Sleep(500) ControlClick($title, '', '', 'right', 1, 1, 1) Sleep(400) ControlSend($title, '', '', 'a') Sleep(400) ControlSend($title, '', '', '{enter}') $var = ClipGet() MsgBox(0,"", $var) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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