[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
自动创建宽带连接原代码:
  1. Set WshShell = CreateObject("WScript.Shell")
  2. strCommandLine = "rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,4"
  3. WshShell.Run(strCommandLine)   '启动Internet连接设置窗口
  4. WScript.Sleep 1000   '延时 1 秒,等窗口启动
  5. WshShell.AppActivate "Internet 属性"   '激活指定标题的窗口
  6. WScript.Sleep 100    '延时 100 毫秒
  7. WshShell.SendKeys "U"   '模拟按动“ U ”键
  8. WScript.Sleep 500    '延时 500 毫秒
  9. WshShell.SendKeys "{ENTER}"   '模拟按回车键
  10. WScript.Sleep 100
  11. WshShell.SendKeys "C"   '模拟按动“ C ”键
  12. WScript.Sleep 100
  13. WshShell.SendKeys "{ENTER}"
  14. WScript.Sleep 100
  15. WshShell.SendKeys "M"
  16. WScript.Sleep 100
  17. WshShell.SendKeys "{ENTER}"
  18. WScript.Sleep 100
  19. WshShell.SendKeys "U"
  20. WScript.Sleep 100
  21. WshShell.SendKeys "{ENTER}"
  22. WScript.Sleep 100
  23. WshShell.SendKeys "{ENTER}"
  24. WScript.Sleep 100
  25. WshShell.SendKeys "{ENTER}"
  26. WScript.Sleep 100
  27. WshShell.SendKeys "S"
  28. WScript.Sleep 100
  29. WshShell.SendKeys "{ENTER}"
  30. Set  WshShell = Nothing
复制代码

[ 本帖最后由 newxso 于 2008-9-26 08:57 编辑 ]

TOP

返回列表