The Creator Posted January 9, 2007 Posted January 9, 2007 Hello everyone again, I'm trying to configure a program to interface with a server I'm currently coding. I'm visually impaired, so I'm not sure if the gui is broken or not, but here are my main problems: I can't get all the text being sent through the connection, I only get about 5% of it. Next, I can't tab around. Last, and I'm not sure if this is linked to the first problem, but when I send text, I can't get any response on it. Thanks, ;FTalk ;Written by Tyler Littlefield ;Copyright 2007 Tyler Littlefield ;All rights reserved ;constants const $version="1.0b" $connected=0 #include <file.au3> #include <string.au3> #include <inet.au3> #include <constants.au3> #include <ie.au3> #include <misc.au3> #include <process.au3> #include <math.au3> #include <guiconstants.au3> GuiCreate("FTalk", 250, 250, -1, -1) GuiCtrlCreateLabel("Input", 10, 5, 240, 20) $input=GuiCtrlCreateEdit("", 5, 40, 240, 40) GuiCtrlSetState($input, $GUI_FOCUS) GuiCtrlCreateLabel("history", 5, 90, 220, 20) $history=GuiCtrlCreateEdit("", 5, 120, 220, 115, $ES_MULTILINE+$ES_READONLY) GuiCtrlSetState($history, $GUI_ENABLE) $status=GuiCtrlCreateLabel("", 5, 230, 240, 20) $send=GuiCtrlCreateButton("send", 215, 90, 40, 25) GUICtrlSetState($send, $GUI_DEFBUTTON) GUICtrlSetResizing($input, $GUI_DOCKAUTO) GuiCtrlSetResizing($history, $GUI_DOCKAUTO) GuiCtrlSetResizing($send, $GUI_DOCKAUTO) GuiCtrlSetResizing($status, $GUI_DOCKAUTO) $historytext="This program was written and edited by Tyler Littlefield."&@crlf&"version: "&$version&"."&@crlf&"Copyright "&@year&", Tyler Littlefield."&@crlf&"All rights reserved."&@crlf&@crlf GuiCtrlSetData($history, $historytext) GuiSetState() TCPStartup() connect() $text="" while 1 $msg=GuiGetMsg() if ($connected == 1) then $text=TCPRecv($connection, 1000000) if (stringlen($text) > 0) then $historytext=$historytext&$text&@crlf GuiCtrlSetData($history, $historytext) EndIf EndIf select case $msg=$GUI_EVENT_CLOSE exit case $msg=$send if $connected == 1 then if (stringlen(GuiCtrlRead($input)) > 0) then MsgBox(0, "", GuiCtrlRead($input)) TCPSend($connection, GUICtrlRead($input)) EndIf EndIf endSelect wend func connect() GuiCtrlSetData($status, "Connecting.") global $connection=TCPConnect(TCPNameToIP("stockton.dyndns.org"), 7777) global $connected=1 sleep(5) $status=GuiCtrlSetData($status, "Connected-ready") EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now