【问题标题】:How to scroll to the bottom of the terminal in C?如何在C中滚动到终端的底部?
【发布时间】:2015-10-03 13:53:02
【问题描述】:

我想在我的函数中向下移动(滚动到底部)终端,我该怎么做?

exemple: void Test(void) { scroll down terminal }

谢谢

【问题讨论】:

  • 这取决于终端的类型——没有便携的方法可以做到这一点。
  • OP没有识别终端类型,即使是识别转义的,25行也不是标准的。顺便说一句,光标寻址与滚动不同。
  • 这会有所帮助,例如,知道这是 Windows 控制台窗口,还是在 Unix/BSD/Linux/等中运行的终端仿真器。但是终端 type 确实很重要。

标签: c scroll terminal


【解决方案1】:

我已经测试了printf("\033[25;1H");,但对我不起作用。 这是因为当我 printf 文本时,终端直接在底部,因为当我在顶部滚动时,当我 printf 时,终端不会在底部

对不起我的英语

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-04
    • 1970-01-01
    • 2014-12-12
    • 2013-03-15
    • 2015-11-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多