GUICreate('COM', 138, 200, 880, 2)
$L1 = GUICtrlCreateInput('', 1, 20, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L2 = GUICtrlCreateInput('', 34, 20, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L3 = GUICtrlCreateInput('', 67, 20, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L4 = GUICtrlCreateInput('', 1, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFff)
GUICtrlSetFont(-1, 12)
$L5 = GUICtrlCreateInput('', 34, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L6 = GUICtrlCreateInput('', 67, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L7 = GUICtrlCreateInput('', 1, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFff)
GUICtrlSetFont(-1, 12)
$L8 = GUICtrlCreateInput('', 34, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L9 = GUICtrlCreateInput('', 67, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L10 = GUICtrlCreateInput('', 1, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFff)
GUICtrlSetFont(-1, 12)
$L11 = GUICtrlCreateInput('', 34, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L12 = GUICtrlCreateInput('', 67, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L13 = GUICtrlCreateInput('', 1, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFff)
GUICtrlSetFont(-1, 12)
$L14 = GUICtrlCreateInput('', 34, 46, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L15 = GUICtrlCreateInput('', 1, 72, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFff)
GUICtrlSetFont(-1, 12)
$L16 = GUICtrlCreateInput('', 34, 72, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$L17 = GUICtrlCreateInput('', 67, 72, 32, 22, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)
$Button1 = GUICtrlCreateButton('挑選最大值', 2, 150, 120, 25)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $Button1
_Max()
EndSwitch
WEnd
Func _Max()
Local $v1 = Number(GUICtrlRead($L4))
Local $v2 = Number(GUICtrlRead($L5))
Local $v3 = Number(GUICtrlRead($L6))
Local $max = $v1, $x = 1, $i
For $i = 5 To 6
If Eval('v' & $i) >= $max Then
$max = Eval('v' & $i)
$x = $i
EndIf
Next
For $i = 15 To 17
GUICtrlSetData(Eval('L' & $i), '')
Next
GUICtrlSetData(Eval('L' & $x + 11), 1)
EndFunc ;==>_max
----------------------------------------------------------------------