Visual Studio 中的命令行 - 如何关闭弹出窗口?
我有如下情况。 我正在运行一些命令,然后我收到一个带有 Y/N 答案的弹出窗口。是否有可能强制回答“是”并通过命令行自动关闭窗口?
I have situation like below.
I'm running some command and then I get a popup with Y/N answer. Is there a possibility to force answer Yes and automatically close the window through command line?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想
单击
外部窗口中的按钮,则需要挂钩该窗口并暴露该按钮。您可以通过 FindWindow 抓取窗口句柄、查找子按钮并发送来完成此操作通过 SendMessage 进行 API 调用的 BM_CLICK。If you want to
click
a button in an external window, you'll need to hook the window with the button exposed. You can accomplish this by grabbing the window handle via FindWindow, finding the child button, and sending a BM_CLICK with an API call via SendMessage.你的意思是VS中的命令窗口?我不认为有任何通用的东西,你可以运行各种各样的东西,这取决于你的命令是什么 - 以及你对它有多少控制权 - 也许你想要做的一些例子可以有所帮助。 “选择”窗口会起作用,但又取决于你在做什么、它的定制程度等。
you mean a command window within VS ? I don't think there's anything generic, you could run all sorts of things, depends on what your command is - and how much control over it you have - maybe some example of what you're trying to do could help. 'picking' the window will work but depends again on what you're doing, how custom it is etc.