Sign in to follow this  
Followers 0
Swimming_Bird

Cant read the stdout of an exe

3 posts in this topic

#1 ·  Posted (edited)

I'm trying to get the stdout from 7z.exe but it's coming out as nul when i use this code:

FileChangeDir ( @ScriptDir )
GUICreate('StdOut Sample for AutoIt Beta', 700, 500)
$edit = GUICtrlCreateEdit('', 20, 20, 660, 460)
GUISetState()
$stdout = Run( '7z.exe l CT_RaidAssist.wui' )
Global $all
While 1
    $data = StdOutRead($stdout)
    If @error Then ExitLoop
    If $data Then
        $all &= $data
    Else
        Sleep(10)
    EndIf
WEnd
GUICtrlSetData($edit, $all)
While WinActive('StdOut Sample for AutoIt Beta')
    Sleep(250)
WEnd

I'm not sure if it has to do with the exe or the code or what?

7z.exe works with virtually any type of archive but the one i was using in there is here

Thanks

Edited by Swimming_BIrd

Share this post


Link to post
Share on other sites



There is no Std i\o flag in your Run() function?

Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] )

Share this post


Link to post
Share on other sites

wow. thats strange last time i tried to use stdout there was no such command in the beta run.

thanks i cant belive i missed that

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