#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Button1 = GUICtrlCreateButton("保存", 232, 384, 137, 33)
$Label1 = GUICtrlCreateLabel("configversion", 8, 8, 67, 17)
$Input1 = GUICtrlCreateInput("17", 168, 8, 81, 21)
$Label2 = GUICtrlCreateLabel("homepagetype", 8, 32, 74, 17)
$Input2 = GUICtrlCreateInput("0", 168, 32, 81, 21)
$Label3 = GUICtrlCreateLabel("openunclosedpagewhenstart", 8, 56, 141, 17)
$Combo1 = GUICtrlCreateCombo("FALSE", 168, 56, 81, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "TRUE|FALSE", "FALSE")
$Label4 = GUICtrlCreateLabel("opennewpage", 8, 80, 72, 17)
$Combo2 = GUICtrlCreateCombo("TRUE", 168, 80, 81, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "TRUE|FALSE", "TRUE")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $_1 ,$_2 ,$_3 ,$shuchu
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$shuchu = 0
_baocun()
EndSwitch
WEnd
Func _baocun()
$_1 = $_1 & '<?xml version="1.0" encoding="utf-8" ?> '& @CRLF &'- <main>'& @CRLF
$_2 = $_2 & '<Item configversion="'& GUICtrlRead($Input1) &'" homepagetype="'& GUICtrlRead($Input2) &'" openunclosedpagewhenstart="'& GUICtrlRead($Input1) &'" opennewpage="'& GUICtrlRead($Combo1) &'" notshowpagewhenopenbyotherprograms="'& GUICtrlRead($Combo2) &'" showalertwhenclose="FALSE" autochechdefaultbrowsersetting="TRUE" multitaborapp="TRUE" appmodekeepmax="FALSE" newwindowfromoutside="0" sc_video="593" sc_soundblocking="1111" '& @CRLF
$_3 = $_3 & '........................'& @CRLF
$_3 = $_3 & 'cleanaccountdata="TRUE" DynamarkEnable="TRUE" DynamarkBubble="TRUE" DynamarkFavOfen="TRUE" DynamarkStartPage="TRUE" DynamarkUseRss="TRUE" DynamarkYellow="TRUE" startpageinitdisplaycount="100" UserInstruct="00101000000000000800020010" showtime="TRUE" /> '& @CRLF &' </main>'
$shuchu = $_1 & $_2 & $_3
$var = FileSaveDialog("输入一个名称.", @WorkingDir, "脚本 (*.xml)", 18, 'XML.xml')
FileWrite($var, $shuchu)
EndFunc