#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
Global $Label1, $Label2, $Label3, $Label4
Global $caput_text = False, $Title, $Name0, $Name1, $Name2
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("信息备份", 901, 701, (@DesktopWidth - 258) / 2, @DesktopHeight - 118)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Edit1 = GUICtrlCreateEdit("", 10, 17, 530, 320, BitOR($ES_AUTOVSCROLL, $WS_HSCROLL, $WS_VSCROLL), _
BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetData(-1, "")
GUICtrlSetOnEvent(-1, "Edit1Change")
$Input1 = GUICtrlCreateInput("姓 名", 8, 368, 170, 21)
$Input2 = GUICtrlCreateInput("联系方式", 192, 368, 185, 21)
$Label1 = GUICtrlCreateLabel("备份总表", 13, 2, 518, 15, $SS_CENTER)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateLabel("邮编:", 392, 372, 31, 17)
GUICtrlCreateLabel("邮编:", 392, 406, 31, 17)
$Input3 = GUICtrlCreateInput("555555", 424, 368, 50, 21)
$Input4 = GUICtrlCreateInput("666666", 424, 402, 50, 21)
;**** 新+文本框 ****姓 名
$Input5 = GUICtrlCreateInput("姓 名", 8, 400, 170, 21)
$Input6 = GUICtrlCreateInput("联系方式", 192, 401, 185, 21)
$Input7 = GUICtrlCreateInput("姓 名", 8, 430, 170, 21)
$Input8 = GUICtrlCreateInput("联系方式", 192, 434, 185, 21)
$Input9 = GUICtrlCreateInput("姓 名", 8, 464, 170, 21)
$Input10 = GUICtrlCreateInput("联系方式", 192, 466, 185, 21)
$Input11 = GUICtrlCreateInput("姓 名", 8, 496, 170, 21)
$Input12 = GUICtrlCreateInput("联系方式", 192, 497, 185, 21)
$Input13 = GUICtrlCreateInput("姓 名", 8, 527, 170, 21)
$Input14 = GUICtrlCreateInput("联系方式", 192, 529, 185, 21)
;**** 新+文本框 ****
$Button1 = GUICtrlCreateButton("保 存", 488, 371, 50, 20)
GUICtrlSetOnEvent(-1, "Button1Click")
$Button2 = GUICtrlCreateButton("清 除", 488, 400, 50, 20)
GUICtrlSetOnEvent(-1, "Button2Click")
;**** 新+按钮 ****
$Button3 = GUICtrlCreateButton("写 入", 488, 430, 50, 20)
GUICtrlSetOnEvent(-1, "Button3Click")
$Button4 = GUICtrlCreateButton("写 入", 488, 459, 50, 20)
GUICtrlSetOnEvent(-1, "Button4Click")
$Button5 = GUICtrlCreateButton("写 入", 488, 488, 50, 20)
GUICtrlSetOnEvent(-1, "Button5Click")
$Button6 = GUICtrlCreateButton("写 入", 488, 518, 50, 20)
GUICtrlSetOnEvent(-1, "Button6Click")
$Button7 = GUICtrlCreateButton("写 入", 488, 547, 50, 20)
GUICtrlSetOnEvent(-1, "Button7Click")
$Button8 = GUICtrlCreateButton("写 入", 488, 576, 50, 20)
GUICtrlSetOnEvent(-1, "Button8Click")
$Button9 = GUICtrlCreateButton("写 入", 488, 605, 50, 20)
GUICtrlSetOnEvent(-1, "Button9Click")
$Button10 = GUICtrlCreateButton("写 入", 488, 635, 50, 20)
GUICtrlSetOnEvent(-1, "Button10Click")
$Button11 = GUICtrlCreateButton("写 入", 488, 664, 50, 20)
GUICtrlSetOnEvent(-1, "Button11Click")
;**** 新+按钮 ****
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func Edit1Change()
EndFunc ;==>Edit1Change
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func Button1Click() ; 保存+显示到备份总表
If $caput_text = False Then _caput_text()
$Title = GUICtrlRead($Input1);读取第一个姓名输入框里的类容
$Name0 = GUICtrlRead($Input2);读取第一个联系方式输入框里的类容
# 读取 $Button1 按钮文本, 确定后续操作
Local $GetText = ControlGetText("信息备份", "", $Button1)
If $GetText = '保 存' Then
$X = GUICtrlRead($Input3)
$Y = GUICtrlRead($Input4)
_enquiry_Ok();转到 调试询问
ElseIf $GetText = '未点中' Then
_enquiry_Nay();转到 调试询问
ElseIf $GetText = '没有了' Then
WinClose("信息备份");关闭向导窗口
EndIf
EndFunc
Func Button2Click() ;
# 读取 $Button2 按钮文本, 确定后续操作
Local $GetText02 = ControlGetText("信息备份", "", $Button2)
If $GetText02 = '清 除' Then
ElseIf $GetText02 = '全 写 入' Then
$yszb = GUICtrlRead($Input5)
$sz = GUICtrlRead($Input6)
$tpqy = GUICtrlRead($Input7)
$tp = GUICtrlRead($Input8)
$xra = GUICtrlRead($Input9)
$xrb = GUICtrlRead($Input10)
$xrc = GUICtrlRead($Input11)
$xrd= GUICtrlRead($Input12)
$xre= GUICtrlRead($Input13)
$xrf= GUICtrlRead($Input14)
_GUICtrlEdit_AppendText($Edit1, '姓 名(' & $yszb & ')联系方式(' & $sz & ')' & @CRLF);写入主窗编辑框
_GUICtrlEdit_AppendText($Edit1, '姓 名(' & $tpqy & ')联系方式(' & $tp & ')' & @CRLF);写入主窗编辑框
_GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xra & ')联系方式(' & $xrb & ')' & @CRLF);写入主窗编辑框
_GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xrc & ')联系方式(' & $xrd & ')' & @CRLF);写入主窗编辑框
_GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xre & ')联系方式(' & $xrf & ')' & @CRLF);写入主窗编辑框
EndIf
EndFunc ;==>Button2Click
Func Button3Click() ; 输入代码
EndFunc ;==>Button3Click
Func Button4Click() ; 输入代码
EndFunc ;==>Button4Click
Func Button5Click() ; 输入代码
EndFunc ;==>Button5Click
Func Button6Click() ; 输入代码
EndFunc ;==>Button6Click
Func Button7Click() ; 输入代码
EndFunc ;==>Button7Click
Func Button8Click() ; 输入代码
EndFunc ;==>Button8Click
Func Button9Click() ; 输入代码
EndFunc ;==>Button9Click
Func Button10Click() ; 输入代码
EndFunc ;==>Button10Click
Func Button11Click() ; 输入代码
EndFunc ;==>Button11Click
Func _enquiry_Ok() ;按钮文本 = 调试 的调试询问
# 修改 '保 存' 按钮文本
ControlSetText("信息备份", "", $Button1, "写 入")
# 显示 '确认' 按钮
GUICtrlSetState($Button2, $GUI_SHOW)
ControlSetText("信息备份", "", $Button2, "全 写 入")
EndFunc ;==>_enquiry_Ok
Func _enquiry_Nay() ;按钮文本 = 没有 的调试询问
# 修改 '清 除' 按钮文本
ControlSetText("信息备份", "", $Button1, "保 存")
# 显示 $Button2 按钮
GUICtrlSetState($Button2, $GUI_HIDE)
EndFunc ;==>_enquiry_Nay
Func _caput_text()
$Title = GUICtrlRead($Input1);读取窗口标题
$Name0 = GUICtrlRead($Input2);读取控件 ID
$caput_text = True
;Button1Click()
EndFunc