Sign in to follow this  
Followers 0
italian

tcp

13 posts in this topic

#1 ·  Posted (edited)

hello to all am Italian ... I have a problem with this script:

#include "Constants.au3"

Local $foo = Run("cmd.exe", @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD)

TCPStartup()

$sock = TCPConnect("ip",5152)

While 1

$rec = TCPRecv($sock,0x1000)

StdinWrite($foo, $rec & @CRLF )

local $line = StdoutRead($foo)

TCPSend($sock,$line)

Sleep(100)

WEnd

TCPCloseSocket($sock)

TCPShutdown()

#include <GuiEdit.au3>

#include <GuiConstantsEx.au3>

#include <GUIConstants.au3>

#include "SkinEngine.au3"

SkinStartLibrary()

$gui = GUICreate("form ", 508, 298)

AddSkin($gui,'lop.skf')

$Edit1 = GUICtrlCreateEdit("", 16, 24, 473, 185)

GUICtrlSetData(-1, "")

$Input1 = GUICtrlCreateInput("", 16, 216, 473, 21)

$Button1 = GUICtrlCreateButton("INVIA", 192, 248, 97, 33, 0)

GUISetState(@SW_SHOW)

TCPStartup()

$main = TCPListen(@IPAddress1,5152)

$sock = TCPAccept($main)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

$leggo = GUICtrlRead($Input1)

TCPSend($sock,$leggo)

$rec = TCPRecv($sock,0x1000)

_GUICtrlEdit_SetText($Edit1, $rec)

TCPCloseSocket($main)

TCPShutdown()

EndSwitch

WEnd

tells me who it does not work please?

Thanks for any response

Edited by italian

Share this post


Link to post
Share on other sites



and what's missing? thanks for having responded

Share this post


Link to post
Share on other sites

do you have any of these

1. SkinEngine.au3

2. SkinStartLibrary()

3. AddSkin()

>Running AU3Check (1.54.10.0)  from:C:\PF~\AutoIt3
C:\upload\hex.au3(22,10) : ERROR: can't open include file "SkinEngine.au3"
#include "SkinEngine.au3"
~~~~~~~~~^
C:\upload\hex.au3(23,18) : ERROR: SkinStartLibrary(): undefined function.
SkinStartLibrary()
~~~~~~~~~~~~~~~~~^
C:\upload\hex.au3(25,23) : ERROR: AddSkin(): undefined function.
AddSkin($gui,'lop.skf')
~~~~~~~~~~~~~~~~~~~~~~^
C:\upload\hex.au3 - 3 error(s), 0 warning(s)
!>10:28:22 AU3Check ended.rc:2
>Running:(3.2.10.0):C:\PF~\AutoIt3\autoit3.exe "C:\upload\hex.au3"  
C:\upload\hex.au3 (22) : ==> Error opening the file.: 
#include "SkinEngine.au3" 

->10:28:24 AutoIT3.exe ended.rc:1
+>10:28:25 AutoIt3Wrapper Finished
>Exit code: 1   Time: 3.044

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

the problem is not with the GUI, I do not understand why the client and the server does not communicate ...

the complete script is here:

http://step92.altervista.org/script.rar

tell me someone knows where is the problem please?

Edited by italian

Share this post


Link to post
Share on other sites

can someone help me please?

Share this post


Link to post
Share on other sites

can someone help me please? I'm beating my head for 4 days and I do not know why it does not work ...

Share this post


Link to post
Share on other sites

can someone help me please? I'm beating my head for 4 days and I do not know why it does not work ...

Script not finished yet, There's no CLIENT Input, Status of the error. etc I guess that's the wrong way to do it.

So, Let's start all over again, Please see the attached files

NB: Run the server before you run the client, set the IPs! if there are any problems ,you'll get the following error "TCPConnect failed with WSA error: XXXXX"

Well, that's all for now.

CLIENT.au3

SERVER.au3

Share this post


Link to post
Share on other sites

you could fix it please? we can .....

Share this post


Link to post
Share on other sites

Please...Help me is very most important...

Share this post


Link to post
Share on other sites

from someone can help me there .... can you please help me .... ...

Share this post


Link to post
Share on other sites

Up

Share this post


Link to post
Share on other sites

thats alot of *before 24 hours BUMPS*

hmmm

TCP isn't that hard.. and i havent looked at your code yet because i don't have downloading privileges on this computer...

but ARE THE CONNECTED firstly?

if so

are the RECV's and sends correctly spaces out?

if NOT CONNECTED

are the IP & PORTs of the client match the server?

OR i had this trouble on my computers at my school WINDOWS FIREWALL...might be of a hassle

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0