如何使批处理文件在运行时从顶部开始?
我创建了一个批处理文件,但是当我运行它并加载它时,它会下降到用户输入的位置,从而切断我的程序的一部分。
有没有办法让它从顶部开始并让用户必须手动向下滚动才能查看他输入的内容?
I've created a batch file, but when I run it and it loads, it goes down to where the user input is, cutting off part of my program.
Is there any way to make it start at the top and make the user have to manually scroll it down to look at what he's entering in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的意思是向控制台生成大量文本(超过一页),然后向用户提出一个问题,例如:
我只看到一个快速解决方案。 不要只是生成所有输出。通过某种寻呼机传递它,例如:
然后用户将能够从顶部读取它,一旦
more
退出,将要求用户做出响应。如果您想要更强大或更漂亮的东西,我会考虑使用精心设计的可执行文件而不是批处理文件来实现。
If you mean you generate a lot of text to the console (more than one page worth) and then ask the user a question, like:
I see only one quick solution. Don't just generate all that output. Pass it through a pager of some sort, something like:
Then the user will be able to read it from the top and once
more
exits, the user will be asked for a response.If you want something more robust or pretty-looking, I'd be looking at doing that with a well-crafted executable rather than a batch file.