Sign in to follow this  
Followers 0
kjcdude

Stdoutread Issue

2 posts in this topic

#1 ·  Posted (edited)

I'm having a very weird issue getting data to stream from a console window into stdoutread.

Here's the source code working without stdoutread so you can see what my goal is.

I can't figure out any possible way to enter the prompts via rsync variables.

Take a look at the two attached images for the prompts that come up.

$v = "-r -v --progress admin@10.10.10.37:" & "'" & '"/share/Public/public/Games & Patches/Aion/"' & "'" & " /cygdrive/c/test/"
ShellExecute("rsync.exe", $v, "C:\Program Files\cwRsync\bin", "open", @SW_HIDE)
WinWait("C:\Program Files\cwRsync\bin\rsync.exe", "")
$wa = WinWait("C:\Program Files\cwRsync\bin\rsync.exe", "")
Sleep(1000)
WinActivate($wa)
WinWaitActive($wa)
send("yes" & "{ENTER}")
sleep(2000)
WinActivate($wa)
WinWaitActive($wa)
send("admin" & "{ENTER}")

while 1
    Sleep(1000)
    Select
        Case ProcessExists("rsync.exe") = 0
            MsgBox(0, "", "Process Closed")
            ExitLoop
        Case WinExists($wa) = 0
            MsgBox(0, "", "Window Closed")
            ExitLoop
    EndSelect
WEnd

Here's the stdoutread code that i'm trying to use, but nothing streams to stdoutread.

#include <Constants.au3>
$v = "-r -v --progress admin@10.10.10.37:" & "'" & '"/share/Public/public/Games & Patches/Aion/"' & "'" & " /cygdrive/c/test/"
$p = Run("C:\Program Files\cwRsync\bin\rsync.exe " & $v, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)

while 1
    $line = StdoutRead($p)
    MsgBox(0, "", $line)
    if ProcessExists($p) = 0 Then Exit
WEnd

post-29143-12622286972732_thumb.png

post-29143-1262228704355_thumb.png

Edited by kjcdude

Share this post


Link to post
Share on other sites



You could try something like this:

Run(@ComSpec & " /c " & 'echo yes |rsync.exe', "", @SW_HIDE)

But I don't think that this works with the password.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

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