Jump to content

Help for Advanced Dos-Box Scripting


Recommended Posts

We are running a old Dos-Application. For some automation we like some scriptings. But the Commands $sStdOut &= StdoutRead dosent work. I have never Input in the variables. I think the Output goes to a Frame-or Display Buffer. A pipe by start the Application > to a File so as dos-like dir *.*>text.txt doesnt work, the File is always empty! Have somebody any Idea for alternate solutions. For Example look the Att.

Thanks for your Feedback

post-37046-1214840575_thumb.png

post-37046-1214840643_thumb.png

Link to comment
Share on other sites

there are some examples (in examples) or running a dos command and reading stdout/ stderr messages from it (this looks like turbo pascal gui to me)

reading from stdout can sometimes be tricky

maybe try something similar to the following and check if there is any output?

$cmd = "exefile.exe"; -> our exe here..

    
    $pid = Run($cmd, @ScriptDir, @SW_HIDE, $STDOUT_CHILD)
    $text = ""
    While ProcessExists($pid)
        $text &= StdoutRead($pid)
    WEnd
    MsgBox(0,"output",$text);
Link to comment
Share on other sites

We are running a old Dos-Application. For some automation we like some scriptings. But the Commands $sStdOut &= StdoutRead dosent work. I have never Input in the variables. I think the Output goes to a Frame-or Display Buffer. A pipe by start the Application > to a File so as dos-like dir *.*>text.txt doesnt work, the File is always empty! Have somebody any Idea for alternate solutions. For Example look the Att.

Thanks for your Feedback

You easiest way might be to WinActivate the DOS window, use Send to get the option you want, and use Send("!{SPACE}ES{ENTER}") to copy the whole window text, then analyse it somehow. Or if you know exactly where the text you want will appear the select Edit then Mark then drag the mouse over the relevant area and send Enter.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...