kjcdude Posted December 31, 2009 Posted December 31, 2009 (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 Edited December 31, 2009 by kjcdude
funkey Posted December 31, 2009 Posted December 31, 2009 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 tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now