开发者

Command line in Visual Studio - how to close popup window?

开发者 https://www.devze.com 2023-02-11 11:21 出处:网络
I have situation like below. I\'m running some command and then I get a popup with Y/N answer. Is there a 开发者_JAVA百科possibility to force answer Yes and automatically close the window through comm

I have situation like below. I'm running some command and then I get a popup with Y/N answer. Is there a 开发者_JAVA百科possibility to force answer Yes and automatically close the window through command line?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号