AM电脑吧 - Win10精简版系统_Win11精简版_Win7旗舰版

Yes
查看: 8568|回复: 9
收起左侧

[其它] 宽带连接生成器(XP用)

[复制链接]
ampc8224

签到天数: 230 天

[LV.7]七个CPU

id dmqhcx88 发表于 2011-08-19 00:08:42


好久以前的东西了,创建过程界面可视,并不是静默版


  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. Opt("WinWaitDelay", 100)
  7. Opt("WinTitleMatchMode", 4)
  8. Opt("WinDetectHiddenText", 1)
  9. Opt("MouseCoordMode", 0)
  10. Opt("WinSearchChildren", 1)
  11. Opt("WinTextMatchMode", 2)
  12. #Region ### START Koda GUI section ###
  13. $Form1 = GUICreate("宽带连接生成器", 242, 132, 192, 124)
  14. $Label1 = GUICtrlCreateLabel("用户名:", 24, 36, 52, 17)
  15. $Label2 = GUICtrlCreateLabel("密  码:", 24, 63, 54, 17)
  16. $Input1 = GUICtrlCreateInput("", 70, 31, 145, 21)
  17. $Input2 = GUICtrlCreateInput("", 70, 58, 145, 21)
  18. $Group1 = GUICtrlCreateGroup("宽带连接", 8, 8, 225, 113)
  19. GUICtrlSetColor(-1, 0x0000FF)
  20. GUICtrlCreateGroup("", -99, -99, 1, 1)
  21. $Button1 = GUICtrlCreateButton("创  建", 24, 88, 75, 25)
  22. $Button2 = GUICtrlCreateButton("取  消", 136, 88, 75, 25)
  23. GUISetState(@SW_SHOW)
  24. #EndRegion ### END Koda GUI section ###
  25. While 1
  26. $nMsg = GUIGetMsg()
  27. Switch $nMsg
  28.   Case $GUI_EVENT_CLOSE
  29.    Exit
  30.         Case $Button1
  31. $rasphone = @AppDataCommonDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk"
  32. If StringInStr(FileRead($rasphone), "[ADSL]") Then
  33.         MsgBox(64, "提示", "宽带连接已存在,无需再建立!  ", 10)
  34.         Exit
  35. EndIf   
  36. $rasphone = @AppDataCommonDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk"
  37. If StringInStr(FileRead($rasphone), "[宽带连接]") Then
  38.         MsgBox(64, "提示", "宽带连接已存在,无需再建立!  ", 10)
  39.         Exit
  40. EndIf   
  41. Dim  $adslname = ( GUICtrlRead($Input1) & @CRLF)
  42. Dim  $adslmm =  ( GUICtrlRead($Input2) & @CRLF)   
  43. Run("rundll32.exe netshell.dll,StartNCW")
  44. TrayTip("提示"," 正在自动建立宽带连接 创建期间请别动鼠键以免出错 ",5)
  45. Sleep(1000)
  46. ;BlockInput(1)
  47. WinWait("新建连接向导", "欢迎使用新建连接向导")
  48. WinActivate("新建连接向导", "欢迎使用新建连接向导")
  49. ControlClick("[LAST]", "", 12324)
  50. WinWait("新建连接向导", "连接到我的工作场所")
  51. ControlClick("[LAST]", "", 12324)
  52. WinWait("新建连接向导", "手动设置我的连接")
  53. ControlClick("[LAST]", "", 22129)
  54. ControlClick("[LAST]", "", 12324)
  55. WinWait("新建连接向导", "用拨号调制解调器连接")
  56. ControlClick("[LAST]", "", 22121)
  57. ControlClick("[LAST]", "", 12324)
  58. WinWait("新建连接向导", "ISP 名称")
  59. ControlClick("[LAST]", "", 12324)
  60. WinWait("新建连接向导", "用户名(&U):")
  61. If $adslname <> "" And $adslmm <> "" Then
  62. WinActivate("新建连接向导", "用户名(&U):")
  63. ControlCommand("新建连接向导", "用户名(&U):", "Edit1", "EditPaste", $adslname)
  64. WinActivate("新建连接向导", "用户名(&U):")
  65. ControlCommand("新建连接向导", "用户名(&U):", "Edit2", "EditPaste", $adslmm)
  66. WinActivate("新建连接向导", "用户名(&U):")
  67. ControlCommand("新建连接向导", "用户名(&U):", "Edit3", "EditPaste", $adslmm)
  68. EndIf
  69. ControlClick("[LAST]", "", 12324)
  70. WinWait("新建连接向导", "正在完成新建连接向导")
  71. ControlClick("[LAST]", "", 21005)
  72. ControlClick("[LAST]", "", 12325)
  73. Exit
  74.   Case $Button2
  75.   Exit
  76. EndSwitch
  77. WEnd
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?验证注册

x

评分

参与人数 1硬盘 +10 带宽 +10 收起 理由
ampc84 admin + 10 + 10 原创内容.

本文地址: https://www.ampc8.com/thread-3081-1-1.html
上一篇:QQ找茬辅助工具
下一篇:reg_转_bat工具
回复

举报

ampc816918

签到天数: 42 天

[LV.5]五张显卡

id 追梦wsi 发表于 2015-09-21 18:57:52
支持支持
回复

举报

ampc821766

签到天数: 22 天

[LV.4]四枚内存条

id eq2ch3 发表于 2015-05-24 15:57:41
支持分享,,
回复

举报

ampc822300

签到: Lazy

id 樱花雪月 发表于 2014-12-11 14:35:12
路过看看   
回复

举报

ampc824256

签到: Lazy

id 151741850 发表于 2014-09-14 19:40:45
好东西大家分享
回复

举报

ampc821386

签到: Lazy

id 襄芸澜 发表于 2014-04-13 13:12:45
谢谢谢谢下
回复

举报

ampc88227

签到天数: 128 天

[LV.7]七个CPU

id 相思风雨中 发表于 2012-05-22 10:17:38
好东西大家用
回复

举报

ampc8721

签到天数: 99 天

[LV.6]六个主机箱

id lixiansheng0 发表于 2011-08-19 10:00:42
支持一下收藏了
回复

举报

ampc8218

签到: Lazy

id jkjjda 发表于 2011-08-19 00:39:46
支持阿木的原创推荐了
回复

举报

ampc84

签到天数: 15 天

[LV.4]四枚内存条

id ②號 发表于 2011-08-19 00:19:25
支持 一切原创的源码 。
回复

举报

您需要登录后才可以回帖 登录 | 验证注册

Powered by AMpc8.Com (晋ICP备13003365号ghs 晋公网安备 14090202000112号 |GMT+8, 2025/5/1 03:54 | A
快速回复 返回顶部 返回列表