简体   繁体   English

发送键Ctrl + Alt + Shift + F6(深度冻结)

[英]Sendkeys Ctrl+Alt+Shift+F6 (Deep Freeze)

I tried to send key combination of Shift+Ctrl+Alt+F6 to bring up Deep Freeze workstation configuration screen SendKeys.Send("+^%{F6}"); 我试图发送Shift + Ctrl + Alt + F6的组合键以调出Deep Freeze工作站配置屏幕SendKeys.Send(“ + ^%{F6}”); And SendKeys.Send("+^%({F6})"); 和SendKeys.Send(“ + ^%({F6})”);

But neither one worked Deep Freeze doesn't have any window to show until after that sent 但是没有人工作过Deep Freeze,直到发送完之后没有任何窗口可显示

In AutoIT version, I can use Send("+^!{F6}") and that worked 在AutoIT版本中,我可以使用Send(“ + ^!{F6}”),并且可以正常工作

Could someone point me to the right direction? 有人可以指出我正确的方向吗? Thanks in advance 提前致谢

Thanks for trying to help. 感谢您的帮助。 Found out Sendkeys.Send will only work if it has target, if not then it just send to it self app. 找到Sendkeys.Send仅在有目标的情况下才起作用,否则,它将发送给它自己的应用程序。 Deep Freeze setting console has no GUI until after the combination keys show it, that's why I cannot use it. 直到组合键显示它之后,Deep Freeze设置控制台才具有GUI,这就是为什么我不能使用它。 AutoIT's Send function doesn't need target, it just act like physical keyboard work. AutoIT的发送功能不需要目标,它的作用就像物理键盘一样。 I temporarily used NuGet InputSimulator to get the job done. 我暂时使用NuGet InputSimulator来完成工作。 Hate to have the dll in executable folder for it to work though, so will look into convert to native PostMessage or SendInput once I learn more about those to understand. 讨厌让dll在可执行文件夹中运行,因此,一旦我了解更多有关这些的信息,就会考虑将其转换为本地PostMessage或SendInput。 Right now my code is simply as: 现在我的代码很简单:

s.Keyboard.ModifiedKeyStroke(
            new[] { VirtualKeyCode.CONTROL, VirtualKeyCode.MENU, 
VirtualKeyCode.SHIFT },
            new[] { VirtualKeyCode.F6 }
            );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM