[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

回复 11楼 的帖子

很抱歉,重修改下。
因为最近我这里网络质量较差,发贴刷新后我确实只看到有我的一个帖子。延迟了,看来。。。

[ 本帖最后由 dahual 于 2009-6-30 11:24 编辑 ]

TOP

感谢大家。
本来是来学习的,看过上面内容之后,很有启发,就写了下面的。。。
  1. Private Sub SleepA()
  2. WScript.Sleep 100 '根据情况适当修改延迟时间
  3. End Sub
  4. Private Sub ADSL(ISP,UserName,PassWord)
  5. Dim WshShell
  6. set WshShell=WScript.CreateObject("WScript.Shell")
  7. Dim strCommandLine
  8. strCommandLine="rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,4"
  9. With WshShell
  10. .Run strCommandLine
  11. SleepA
  12. .AppActivate "Internet 属性"
  13. .SendKeys "%U"
  14. SleepA
  15. .SendKeys "{Enter}"
  16. SleepA
  17. .AppActivate "新建连接向导"
  18. SleepA
  19. .SendKeys "{Enter}"
  20. SleepA
  21. .SendKeys "%C"
  22. SleepA
  23. .SendKeys "{Enter}"
  24. SleepA
  25. .SendKeys "%M"
  26. SleepA
  27. .SendKeys "{Enter}"
  28. SleepA
  29. .SendKeys "%U"
  30. SleepA
  31. .SendKeys "{Enter}"
  32. SleepA
  33. .SendKeys ISP
  34. SleepA
  35. .SendKeys "{Enter}"
  36. SleepA
  37. .SendKeys UserName
  38. SleepA
  39. .SendKeys "{Tab}"
  40. SleepA
  41. .SendKeys PassWord
  42. SleepA
  43. .SendKeys "{Tab}"
  44. SleepA
  45. .SendKeys PassWord
  46. SleepA
  47. .SendKeys "{Enter}"
  48. SleepA
  49. .SendKeys "%S"
  50. SleepA
  51. .SendKeys "{Enter}"
  52. End With
  53. Set WshShell=Nothing
  54. End Sub
  55. Private Sub CreateNetwork()
  56. Dim ISP,User,Pass
  57. ISP=InputBox("请输入宽带连接名称(汉字不行哟):","创建新连接","vbs")
  58. User=InputBox ("请输入用户名:","创建新连接")
  59. Pass=InputBox ("请输入密码:","创建新连接")
  60. Call ADSL(ISP,User,Pass)
  61. End Sub
  62. Call CreateNetwork
复制代码

TOP

返回列表