本帖最后由 ygqiang 于 2015-5-28 07:16 编辑
[已解决]发送组合键ctrl+n的vbs代码,如何写?谢谢- '定义主程序
- Dim Program1,a,b
- Program1 = "C:\TheWorld1\TheWorld.exe"
-
- Set WshShell=createobject("wscript.shell")
-
- '运行主程序
- Set oExec=WshShell.Exec(Program1)
- WScript.Sleep 2000
-
- '发送组合键ctrl+n
- WshShell.SendKeys "^n"
-
- '输入网址
- wshShell.SendKeys "www.baidu.com"
- WshShell.SendKeys "{ENTER}"
- WScript.Sleep 2000
复制代码
|