GUICreate('COM', 138, 100, 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)
$Button1 = GUICtrlCreateButton('挑選最大值', 2, 70, 70, 25)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $Button1
_Max()
EndSwitch
WEnd
Func _Max()
Local $v1 = Number(GUICtrlRead($L1))
Local $v2 = Number(GUICtrlRead($L2))
Local $v3 = Number(GUICtrlRead($L3))
Local $max = $v1, $x = 1, $i
For $i = 2 To 3
If Eval('v' & $i) >= $max Then
$max = Eval('v' & $i)
$x = $i
EndIf
Next
For $i = 4 To 6
GUICtrlSetData(Eval('L' & $i), '')
Next
GUICtrlSetData(Eval('L' & $x + 3), 1)
EndFunc ;==>_max