|
发表于 2010-4-7 14:40:16
|
显示全部楼层
#RequireAdmin
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=LAN.ico
#AutoIt3Wrapper_outfile=宽带连接创建程序.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Comment=宽带连接创建程序
#AutoIt3Wrapper_Res_Description=宽带连接创建程序
#AutoIt3Wrapper_Res_Fileversion=1.0.0.2
#AutoIt3Wrapper_Res_LegalCopyright=GCH
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Opt("WinWaitDelay", 100)
Opt("TrayAutoPause", 0)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)
Opt("WinSearchChildren", 1)
Opt("WinTextMatchMode", 2)
Run("rundll32.exe netshell.dll,StartNCW")
WinWait("新建连接向导", "欢迎使用新建连接向导")
WinActivate("新建连接向导", "")
WinSetState("[LAST]", "", @SW_HIDE)
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "连接到我的工作场所")
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "手动设置我的连接")
ControlClick("[LAST]", "", 22129)
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "用拨号调制解调器连接")
ControlClick("[LAST]", "", 22121)
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "ISP 名称")
ControlSetText("[LAST]", "", 1680, "宽带连接.")
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "任何用户从这台计算机")
ControlSetText("[LAST]", "", 1614, "");用户名
ControlSetText("[LAST]", "", 1615, "");密码
ControlSetText("[LAST]", "", 1616, "");确认密码
ControlClick("[LAST]", "", 12324)
WinWait("新建连接向导", "正在完成新建连接向导")
WinSetState("[LAST]", "", @SW_SHOW)
;ControlClick("[LAST]", "", 21005)
ControlCommand("[LAST]", "", 21005, "Check")
Sleep(50)
If ControlCommand("[LAST]", "", 21005, "IsChecked", "") Then
ControlClick("[LAST]", "", 12325)
TrayTip("", "创建桌面快捷方式!", 15, 1)
Sleep(1000)
Call("_Exist")
EndIf
ControlClick("[LAST]", "", 12325)
TrayTip("", "未创建桌面快捷方式!", 15, 1)
Sleep(1000)
Call("_Exist")
Func _Exist()
Sleep(50)
If ControlCommand("网络配置", "", 65535, "IsVisible") Then
WinSetState("[LAST]", "", @SW_HIDE)
;WinSetState("网络配置", "连接已存在", @SW_HIDE)
ControlClick("[LAST]", "", 2)
ControlClick("新建连接向导", "正在完成新建连接向导", 2)
TrayTip("", "宽带连接已存在!", 15, 1)
Sleep(2000)
Exit
EndIf
TrayTip("", "宽带连接已成功创建!", 15, 1)
Sleep(3000)
Exit
EndFunc |
|