每3秒钟循环Alt + Tab

时间:2018-10-29 10:04:38

标签: vbscript hta

创建此脚本以使用HTA每3秒循环 Alt + Tab 。我在这里想念什么?

<HTA:APPLICATION 
    border="thin" 
    borderStyle="normal" 
    caption="yes" 
    scroll="no" 
    scrollFlat="yes"
/>

<script language="VBScript">
Option Explicit
Sub btnSETUP_Click
    Dim objShell
    Set objShell = CreateObject("WScript.Shell")
    Do
        objShell.SendKeys "%+{TAB}"
        WScript.Sleep 30000
    Loop
End Sub
</script>

然后是带有按钮的HTML页面

<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <p><center><input type="button" id="btnSETUP" name="btnSETUP" value="Loop Keys" onclick="btnSETUP_Click"></button></center><div align="right">
</body>
</html> 

返回的错误:

  

错误:所需对象:“ WScript”

0 个答案:

没有答案