Local $msg,$email,$password
$form = GUICreate("用户信息收集 "&$softversion,400,200) ; 创建窗口
GUICtrlCreateLabel("本工具支持的foxmail版本:"&$supportver&",支持的邮箱后缀:"&$domain, 10, 10, 400);创建提示label
GUICtrlSetColor(-1, 0xff0000) ; 设置提示为红色
GUICtrlCreateLabel("邮箱帐号及密码请咨询本地行政部门", 70, 30, 400)
GUICtrlCreateLabel("邮箱帐号:", 10, 80,200)
GUICtrlSetTip(-1, "行政部门发给您的邮箱帐号")
GUICtrlCreateLabel("邮箱密码:", 10, 110,200)
GUICtrlSetTip(-1, "行政部门发给您的密码,不是自己任意输入")
$email = GUICtrlCreateInput("", 100, 78, 130, 20)
$password = GUICtrlCreateInput("", 100, 108, 130, 20)
GUICtrlCreateLabel("(例如:san.zhang)", 250, 80,200)
$Button_1 = GUICtrlCreateButton("开始配置", 80,150) ;创建按钮
$Button_2 = GUICtrlCreateButton("退出配置", 190,150)
GUISetState(@SW_SHOW) ; 显示对话框
While 1 ;循环获取事件
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE ;如果是关闭窗口事件,退出循环
Exit(1)
Case $Button_1
If StringLen(GUICtrlRead($email))<4 Then
MsgBox(16,"错误","邮箱帐号长度至少3个字母,请修改")
GUICtrlSetState($email, $GUI_FOCUS)
Else
GUICtrlSetState($Button_1,$GUI_DISABLE)
GUICtrlSetState($email,$GUI_DISABLE)
GUICtrlSetState($password,$GUI_DISABLE)
backupmail(GUICtrlRead($email),GUICtrlRead($password))
EndIf
Case $Button_2
Exit(1) ; 点击按钮 2 退出程序
EndSwitch
WEnd