#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 319, 186, 350, 205)
$Button1 = GUICtrlCreateButton("CS英文ID", 24, 8, 81, 25)
$Button2 = GUICtrlCreateButton("CS中文ID", 24, 40, 81, 25)
$Button3 = GUICtrlCreateButton("你的密码", 24, 72, 81, 25)
$Button4 = GUICtrlCreateButton("确定注册", 72, 144, 81, 25)
$Input1 = GUICtrlCreateInput("", 120, 8, 121, 21)
$Input2 = GUICtrlCreateInput("", 120, 40, 121, 21)
$Input3 = GUICtrlCreateInput("", 120, 72, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$Button5 = GUICtrlCreateButton("你的QQ", 24, 104, 81, 25)
$Input4 = GUICtrlCreateInput("", 120, 104, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
UDPStartup()
$socket = UDPOpen("192.168.0.236", 64213)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button4
$EN = GUICtrlRead($Input1)
$CN = GUICtrlRead($Input2)
$Pass = GUICtrlRead($Input3)
$QQ = GUICtrlRead($Input4)
If $EN = 0 then
MsgBox(16, "错误", "请输入完整你的注册信息")
ElseIf $CN = 0 then
MsgBox(16, "错误", "请输入完整你的注册信息")
ElseIf $Pass = 0 then
MsgBox(16, "错误", "请输入完整你的注册信息")
ElseIf $QQ = 0 then
MsgBox(16, "错误", "请输入完整你的注册信息")
else
UDPSend($socket,StringToBinary ("" & $en & " " & "" & $cn,4));转换并发送二进制数据(支持中文全显示)
MsgBox(0,"服务器提示","注册成功")
EndIf
EndSwitch
WEnd