Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("VChat", 616, 438, 192, 124)
- $Input1 = GUICtrlCreateInput("", 8, 8, 513, 25)
- $Button1 = GUICtrlCreateButton("Send", 528, 8, 75, 25, $BS_DEFPUSHBUTTON)
- $Edit1 = GUICtrlCreateEdit("", 8, 40, 593, 385, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL))
- GUICtrlSetData(-1, "")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- TCPStartup()
- Func sendData()
- Local $TCPConnect = TCPConnect(@IPAddress1, 80)
- If $TCPConnect = -1 Then MsgBox(0, "Error", @error)
- Global $TCPSend = TCPSend($TCPConnect, GUICtrlRead($Input1))
- GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & GUICtrlRead($Input1) & @CRLF)
- GUICtrlSetData($Input1, "")
- EndFunc
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- sendData()
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement