Windows序列号格式:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Dim $k1 = "", $k2 = "", $k3 = "", $k4 = "", $k5 = ""“
$Key = "MRX3F-47B9T-2487J-KWKMF-RPWBY"
$Key = StringReplace($Key, "-", "")
$key_1 = StringLeft($Key, 5)
If $key_1 <> $k1 Then
$k1 = $key_1
GUICtrlSetData($InputKey_1, $key_1)
EndIf
$2 = StringLeft($Key, 10)
$key_2 = StringRight($2, 5)
If $key_2 <> $k2 Then
$k2 = $key_2
GUICtrlSetData($InputKey_2, $key_2)
EndIf
$3 = StringRight($Key, 15)
$key_3 = StringLeft($3, 5)
If $key_3 <> $k3 Then
$k3 = $key_3
GUICtrlSetData($Inputkey_3, $key_3)
EndIf
$4 = StringRight($Key, 10)
$key_4 = StringLeft($4, 5)
If $key_4 <> $k4 Then
$k4 = $key_4
GUICtrlSetData($InputKey_4, $key_4)
EndIf
$key_5 = StringRight($Key, 5)
If $key_5 <> $k5 Then
$k5 = $key_5
GUICtrlSetData($InputKey_5, $key_5)
EndIf
可将序列号分段显示在输入框控件中。