Sign in to follow this  
Followers 0
JamesDover

WinExists won't close StdoutRead GUI Output

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

StdoutRead() does not block anymore in the latest beta so I think it will suite you perfectly :D

Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Cheers but no luck. The beta won't compile it. Has anyone found a way around this?

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