Jump to content

carstengiese

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by carstengiese

  1. Is there any way to prompt for a password with this code WITHOUT showing the password, but something like "******" during input?
  2. ...and in case you just want to read till a single line-break, then use this: func ReadLine() Local $sResult Local $sText While True $sText = ConsoleRead() If @error Then ExitLoop if StringRight($sText, 1) = @LF then $sResult &= $sText ExitLoop EndIf Sleep(20) WEnd return $sResult EndFunc
  3. 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
×
×
  • Create New...