#include <Constants.au3 >
#include <WinAPI.au3>
#include <WinAPIEx.au3>
#include <Misc.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon
#Region
Global $Form_SoftInstall = GUICreate("Soft_Name", 852, 600, 193, 131)
GUISetBkColor(0xC0C0C0)
Global $Pic1 = GUICtrlCreatePic("C:\WINDOWS\Web\Wallpaper\bliss.jpg", 0, 0, 551, 92)
Global $Group_ChooseSoft = GUICtrlCreateGroup(" 选择软件: ", 8, 96, 537, 245, -1, $WS_EX_TRANSPARENT)
If Not FileExists(@ScriptDir & "\test.ini") Then
MsgBox(0, "配置文件不存在", "找不到:" & @ScriptDir & "\test.ini")
Exit
EndIf
Global $secNamesArray = IniReadSectionNames(@ScriptDir & "\test.ini")
If @error Then
MsgBox(0, "配置文件为空", "请检查:" & @ScriptDir & "\test.ini")
Exit
EndIf
Global $i
Global $secCnt = $secNamesArray[0]
Global $Checkbox1[$secCnt][3]
For $i = 0 To $secCnt - 1
$Checkbox1[$i][1] = $secNamesArray[$i + 1]
$Checkbox1[$i][0] = GUICtrlCreateCheckbox($Checkbox1[$i][1], _Iif($i < 5, 60, 330), 120 + Mod($i, 5) * 43, 193, 33)
$Checkbox1[$i][2] = IniRead(@ScriptDir & "\test.ini", $Checkbox1[$i][1], "文件名", "没有读到")
Next
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Button1 = GUICtrlCreateButton("安装", 352, 360, 75, 25)
Global $Button2 = GUICtrlCreateButton("退 出", 440, 360, 75, 25)
Global $Radio1 = GUICtrlCreateRadio("全选", 216, 364, 57, 17)
Global $Radio2 = GUICtrlCreateRadio("全不选", 280, 364, 65, 17)
GUISetState(@SW_SHOW)
#EndRegion
Global $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
EndSwitch
WEnd