> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# rconsoleinput

> 在清除 console input state 并忽略 input 直到下一个 newline 后，使用 console input 从 stdin 读取一条 line 时会 yield。返回的 string 通过 string return 推入，并且不包含结尾 newline。如果不存在 console window，该调用会返回且不带 values。

<div className="real-function-page">
  ```lua theme={null}
  rconsoleinput(): string
  ```

  ## 别名

  * `consoleinput`

  ## 返回值

  <ResponseField name={"input"} type={"string"}>
    从控制台读取的文本行。
  </ResponseField>

  ## 示例

  Read one submitted line from the current Windows console.

  ```lua theme={null}
  rconsolecreate()
  rconsoleprint("Name: ")
  local name = rconsoleinput()
  rconsoleprint("Hello, ", name, "
  ")
  ```
</div>
