Local $aTabItem[9] = [8], $aCheckbox[13][9] = [[12]], $iTab = 1
Local $aCkTxt[12] = ['XD<上>', 'XD<下>', 'BT<上>', 'BT<下>', 'ND<上>', 'ND<下>', 'SL<上>', _
'SL<下>', 'DF<上>', 'DF<下>', 'KN<上>', 'KN<下>']
Local $aRdTxt[8] = ['A1', 'A4', 'A7', 'D1', 'D8', 'E1', 'E2', 'NO']
Local $hGui = GUICreate('老板专用>>>调控器 - JS 01', 623, 442)
GUISetBkColor(0xFFFFFF)
Local $tab = GUICtrlCreateTab(5, 5, 390, 370)
For $i = 1 To 8
_CreateTab($i)
Next
GUICtrlCreateTabItem('')
Local $Bt = GUICtrlCreateButton('读取', 500, 355, 100, 22)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $tab
$iTab = GUICtrlRead($msg) + 1
WinSetTitle($hGui, '', '老板专用>>>调控器 - JS 0' & $iTab)
Case $aCheckbox[1][$iTab] To $aCheckbox[12][$iTab]
If Not IsInt(($msg - $aCheckbox[1][$iTab]) / 9) Then ContinueLoop
Local $state = GUICtrlRead($msg)
For $xx = 0 To 7
GUICtrlSetState(Eval($msg & '_' & $xx), Round($state / 2) * 64)
Next
Case $Bt
Local $sInfo = ''
For $j = 1 To 12
If GUICtrlRead($aCheckbox[$j][$iTab]) <> 1 Then ContinueLoop
$sInfo &= $aCkTxt[$j - 1] & ' ===> '
For $xx = 0 To 7
If GUICtrlRead(Eval($aCheckbox[$j][$iTab] & '_' & $xx)) = 1 Then
$sInfo &= $aRdTxt[$xx]
EndIf
Next
$sInfo &= @CRLF
Next
If $sInfo <> '' Then MsgBox(0, 'JS 0' & $iTab, $sInfo)
EndSwitch
WEnd
Func _CreateTab($x)
$aTabItem[$x] = GUICtrlCreateTabItem('JS 0' & $x)
Local $j_x = 32, $j_y = 20, $j_Jy = 30
For $i = 0 To 11
$aCheckbox[$i + 1][$x] = GUICtrlCreateCheckbox($aCkTxt[$i], 10, $j_Jy + $j_y * $i, 70, 15)
GUIStartGroup()
For $ii = 0 To 7
Assign($aCheckbox[$i + 1][$x] & '_' & $ii, GUICtrlCreateRadio($aRdTxt[$ii], _
80 + $j_x * $ii, $j_Jy + $j_y * $i, 30, 17), 2)
GUICtrlSetState(-1, 128)
Next
If Not IsInt($i / 2) Then $j_Jy += 20
Next
EndFunc ;==>_CreateTab