If Run(@ScriptDir&"\foxmail65.exe") Then
WinWait($foxmail,"欢迎使用 Foxmail 6.5 正式版 安装向导")
WinActivate($foxmail,"欢迎使用 Foxmail 6.5 正式版 安装向导")
ControlClick($foxmail,"下一步(&N) >","Button2")
WinWait($foxmail,"软件许可协议")
WinActivate($foxmail,"软件许可协议")
ControlClick($foxmail,"我同意(&I)","Button2")
WinWait($foxmail,"选定安装位置")
Sleep(1000)
Send("D:\Foxmail")
Sleep(500)
ControlClick($foxmail,"下一步(&N) >","Button2")
WinWait($foxmail,"选择“开始菜单”文件夹")
WinActivate($foxmail,"选择“开始菜单”文件夹")
ControlClick($foxmail,"安装(&I)","Button2")
Sleep(500)
WinWait($foxmail,"安装完成")
WinActivate($foxmail,"安装完成")
ControlCommand($foxmail,"显示“自述文件”(&M)","Button4","uncheck")
Sleep(500)
ControlClick($foxmail,"完成","Button2")
WinWait("向导","AccName")
WinActivate("向导","AccName")
$mail1=InputBox("输入用户拼音全拼","举例:王大,输入wangda","","",-1,-1,0,0)
ControlSetText("向导","","TEdit1",$mail1&"@kjpcb.cn")
Sleep(500)
$mail2=InputBox("输入密码","输入四位的字母和数字混合","","",-1,-1,0,0)
ControlSetText("向导","","TEdit2",$mail2)
Sleep(500)
ControlClick("向导","下一步(&X) >","TButton3")
WinWait("向导","Server")
WinActivate("向导","Server")
ControlSetText("向导","","TEdit3","192.168.1.222")
Sleep(500)
ControlSetText("向导","","TEdit2","192.168.1.222")
Sleep(500)
ControlClick("向导","下一步(&X) >","下一步(&X) >")
WinWait("向导","Finish")
WinActivate("向导","Finish")
ControlClick("向导","完成","TButton3")
If ProcessExists("Foxmail.exe") Then
WinWait("Foxmail")
WinActivate("Foxmail")
Send("^k")
Else
ShellExecute("Foxmail.lnk","",@DesktopDir,"open",@SW_MAXIMIZE)
EndIf
Sleep(500)
WinSetOnTop("地址簿","MenuBar",1)
WinWait("地址簿","MenuBar")
WinActivate("地址簿","MenuBar")
Send("!t")
Sleep(500)
Send("{right}")
Sleep(500)
Send("{enter}")
Sleep(500)
WinWait("向导","IMpFileName")
WinActivate("向导","IMpFileName")
ControlSetText("向导","","TEdit1",@DesktopDir&"\add.csv")
WinWait("向导","下一步(&X) >")
WinActivate("向导","下一步(&X) >")
Send("!x")
Sleep(500)
WinWait("向导","ImpSelectFields")
WinActivate("向导","ImpSelectFields")
ControlClick("向导","全选(&S)","TButton7")
Sleep(500)
ControlClick("向导","完成","TButton3")
Sleep(500)
AdlibRegister("_fugai")
WinWait("消息","确定")
WinActivate("消息","确定")
ControlClick("消息","确定","TButton1")
AdlibUnRegister("_fugai")
WinSetOnTop("地址簿","MenuBar",0)
Sleep(500)
MsgBox(0,"foxmail地址簿更新","更新成功",2)
Else
MsgBox(16,"安装失败","检查安装文件是否有效",2)
EndIf
Func _fugai()
If WinExists("确认","替换所有(&P)") Then
WinActivate("确认","替换所有(&P)")
ControlClick("确认","替换所有(&P)","TButton1")
Sleep(500)
EndIf