$form = GUICreate('test')
$Combo = GUICtrlCreateCombo("", 100, 100, 89, 21, 3)
GUICtrlSetData(-1, "3.0|0.2|1.0", '3.0')
$button = GUICtrlCreateButton('test', 100, 200, 60, 30)
GUISetState(@SW_SHOW, $form)
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $button
$Ver = StringSplit(GUICtrlRead($Combo), '.')
If $Ver[2] = '0' Then
If MsgBox(68, 0, '是否写入:' & $Ver[2] & '.' & $Ver[1]) = 6 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\GAME", "Version", "REG_SZ", $Ver[2] & '.' & $Ver[1])
Else
MsgBox(64, 0, '得到数值:' & $Ver[1] & '.' & $Ver[2])
EndIf
EndSwitch
WEnd
|