Kann mir jemand helfen; Warum wird das Passwort nicht übergeben.
Spoiler anzeigen
; Demonstrates the use of StdinWrite()
#include <Constants.au3>
Local $foo = Run(@ProgramFilesDir & "\" & "notes\nfixup", @UserProfileDir & "\NOTESDATA\", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)
; Write string to be sorted to child sort.exe's STDIN
;StdinWrite("password" & @CRLF)
_ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : StdinWrite($foo,"password" & @CRLF) = ' & StdinWrite($foo,"password" & @CRLF) & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
; Calling with no 2nd arg closes stream
;StdinWrite($foo)
_ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : StdinWrite($foo) = ' & StdinWrite($foo) & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
; Read from child's STDOUT and show
Local $data
While True
$data = StdoutRead($foo)
If @error Then ExitLoop
_ConsoleWrite($data) ;### Debug Console
Sleep(25)
WEnd
Func _ConsoleWrite($sMsg)
If Not $sMsg = "" Then
$sMsg = StringReplace($sMsg, @CRLF, " ")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sMsg = ' & $sMsg & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
;_FileWriteLog(@TempDir & "\" & @ScriptName & ".log", $sMsg)
EndIf
EndFunc ;==>_ConsoleWrite
Danke