Jump to content

WinExists won't close StdoutRead GUI Output


Recommended Posts

I am tring to build into a program a way to close StdoutRead with the Winkill command. How ever the StdoutRead seems to pause everything so the winkill has no effect along with any other button. I looked through the help files and forums with no luck.

#include <GUIConstants.au3>
;$ServerPing = Ping("x.x.x.x", 250)
If @error = 0 Then
    If WinExists("Connections") Then;This clears out any existing StdoutRead gui's in case the user has clicked on the program twice.
        WinKill("Connections")
    Else
    EndIf
    $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, $STDOUT_CHILD)
    $line20 = StdoutRead($foo)
    Sleep(200)
    MsgBox(262144, "Connections", $line20)
ElseIf @error = 1 Then
MsgBox(0,"server not found",400)
Else
EndIf
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...