简体   繁体   English

JavaScript打开Windows开始菜单

[英]JavaScript to open Windows Start Menu

I'm working on a personal project where I need a button within a browser to open the start menu (the actual menu, not explorer). 我正在一个个人项目中,需要在浏览器中打开启动菜单(实际菜单,而不是资源管理器)。 I'm working in IE9 as I'm aware this probably wont be possible in newer browsers. 我正在IE9中工作,因为我知道这在较新的浏览器中可能无法实现。

I found a VBS and tried to adapt it as follows, unfortunately I cant get it to work, perhaps someone could point out where I'm going wrong 我找到了VBS,并尝试如下进行调整,很遗憾,我无法使它正常工作,也许有人可以指出我出了问题的地方

<script>
    function SendKeys99() {
    Set WshShell = CreateObject("WScript.Shell");
    WshShell.SendKeys "^{ESC}";
    }
</script>

<input type="image" img src="assets\Start-Button-High-Res.jpg" height="100" width="100" onclick="SendKeys99();"/>

I'm pretty sure that this will not work as you will have very limited access outside of the browser for security reasons. 我很确定这不会起作用,因为出于安全原因,您在浏览器外部的访问非常有限。

If you want to automate Windows I would highly recommend using AutoHotKey or an actual VB application. 如果要自动化Windows,我强烈建议您使用AutoHotKey或实际的VB应用程序。

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

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