如何使用Python获取游戏机标题名称?
获取控制台标题名称而不是重命名的变化吗? 我知道我可以使用IE ctypes.windll.kernel32.setConsoLetitlew来设置控制台的新标题,但我只想获取标题名称,并且不设置新标题。
Is there any change of getting console title name instead of renaming it?
I know that I can use i.e. ctypes.windll.kernel32.SetConsoleTitleW to set new title of the console but I just want to get title name and do not set new title.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
毫不奇怪,伴随函数是
getConsoleTitleW
。Unsurprisingly, the companion function is
GetConsoleTitleW
.呼叫
getConsoLetitlew
不足以获得控制台标题。相反,您首先需要创建一个缓冲区以持有该数据并传递。然后,返回缓冲区的值。以下功能将返回控制台标题:
Calling
GetConsoleTitleW
is not enough to obtain the console title. Instead, you first need to create a buffer to hold that data and pass that. Then, return the buffer's value.The following function will return the console title: