You were assuming, that "ConsoleRead()" waits till you press any key, but this is NOT the case.
Even if you do not enter anything, it will continue with an empty output.
Here is a function that reads input from the console:
func ReadInput() ; read input from STDIN till two line-breaks are entered
Local $sResult
Local $sText
While True
$sText = ConsoleRead()
If @error Then ExitLoop
if $sText<>"" then
if $sText=@CRLF then
ExitLoop
Else
$sResult &= $sText
EndIf
EndIf
Sleep(20)
WEnd
return $sResult
EndFunc