Jump to content

Recommended Posts

Posted (edited)

Hi,

I have a script that gives me some stdout. I want to write it in a file. The problem is that it's repeating same stuff all the time.

For instance, script A writes to console "This is a test".

Then, my GUI writes this into an edit box:

If _IsChecked($chbSit1) Then
                $leerSit1 = StdoutRead($pidSit1) & $leerSit1
                GUICtrlSetData($editSit1, $leerSit1)
            endif

So far, fine. Problem is, I want to write this into a file but ONLY the new lines that showed up in stdoutread($pidsit1). Because if I just do this:

FileWriteLine($fileNameColHandle, GUICtrlRead($editCol))

What I get is a file with $editcol text repeated again and again.

How can I write only new lines into the file using stdout?

Thanks

 

PS: Also, when using GUICtrlSetData($editCol, $leerCol) I'm pasting all the text everytime. If I can only get new lines from stdout, is there a way to append lines in the edit box?

Thanksthanksthanks

Edited by DLXS
Posted

Maybe you should filter the stdout output by reading using a while loop (look at the example for StderrRead in the helpfile)

To append text in an edit you have to use a param : GUICtrlSetData ($edit, $data, 1)

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
  • Recently Browsing   0 members

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