问题描述
我有屏幕截图软件 picPick
并且我设置了热键来拍摄可滚动的照片CTRL + ALT + PRINT_SCREEN 按钮.
I have screen capture software picPick
and I've set hot key to take scrollable shots withCTRL + ALT + PRINT_SCREEN buttons.
我的目标是运行应用程序,然后按热键来捕获屏幕.但似乎 picPick 已运行但 SendKeys() 没有做任何我认为的事情,没有任何反应,我做错了什么?
My goal is to run the application, then press hotkey to capture the screen.But seems picPick is ran but SendKeys() are not doing anything I think, nothing occurs,what am I doing wrong?
VBScript
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\picPick"
WshShell.SendKeys("+^{PRTSC}")
我也尝试过简单的打印屏幕,
I also tried simple print screen,
WshShell.SendKeys("{PRTSC}")
然后尝试将我得到的内容粘贴到 MS Paint 上,但没有任何反应(即截图 btn 没有被按下,我相信)
Then tried paste what I got onto MS Paint but nothing happened (i.e. screenshot btn wasn't pressed I believe)
推荐答案
正如 SendKeys
方法说明:
As it is stated in the SendKeys
method description:
您不能将 PRINT SCREEN 键 {PRTSC} 发送到应用程序.
{PRTSC} 代码可能保留供将来使用,例如在 .NET SendKeys.Send
.
The {PRTSC} code is probably reserved for future use, like in .NET SendKeys.Send
.
这篇关于如何使用 VBScript 发送击键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!