Sign in to follow this  
Followers 0
thl1000

StdoutRead Problem

4 posts in this topic

Hi,

i have some probs with this part of code:

#
$a = Run(@ComSpec & " /c H:\Tools\psexec.exe \\server02 test.cmd", "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $b = StdoutRead($a)
    If @error Then ExitLoop
    MsgBox(0, "STDOUT read:", $b)
Wend

This code works fine if i call it standalone

Calling it within a function (see code below), the while...wend part seems not to be executed...

Func _VMACHINES()
        LOCAL $H = GUICtrlRead($HServer_List)
        LOCAL $a
        LOCAL $b

        If $H = "--------" Then
              MsgBox(0, "Fehler", "Bitte wählen Sie einen Host-Server aus!")
        EndIf
      
        $a= Run(@ComSpec & " /c H:\Tools\psexec.exe \\server02 test.cmd", "", @SW_SHOW, $STDOUT_CHILD)
        While 1
            $b= StdoutRead($a)
            If @error Then ExitLoop
            GUICtrlSetData($V_List, $b, "--------")
           ;MsgBox(0, "STDOUT read:", $b)
        Wend

        GUICtrlSetState($VM_List,$GUI_ENABLE)
        GUICtrlSetState($BackUp, $GUI_ENABLE)
EndFunc

Does anybody has an idea how to get it working??

Share this post


Link to post
Share on other sites



Calling it within a function (see code below), the while...wend part seems not to be executed...

how did you check if the while...wend part gets executed?

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

I checked it using the message box

regards

Thomas

Share this post


Link to post
Share on other sites

I checked it using the message box

is the code posted above the FULL source code?

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
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
Sign in to follow this  
Followers 0