Sign in to follow this  
Followers 0
kjmarket

TCP problem

2 posts in this topic

#1 ·  Posted (edited)

I copied and pasted a script by AutoIt smith in his TCP made easy, and it works. I'm doing this to learn btw...Anyway, I made a simple gui to make it connect when I enter the IP address and push a button Works. If I add some code around the connection initialized line, like send a simple message, then it works. I had another tab on the gui that allowed me to specify z message to be sent and he code is fine, and the same code works as stated earlier around the connection initialized line, but after I connect, its like the thing freezes up in a way. I can go back and forth between tabs, but the button to send the message doesnt work..it just does nothing. I tried getting rid of the tabs and making a parent and child gui. The parent GUI opens asking for the ip address and you enter it then click connect. If it connects, the message comes up, and it does. After this its supposed to hide the parent and show the child gui. Jus tlike before, its like it freezes up. I can click the button still, or move it, but the parent gui stays on screen, and the child gui never shows. I've tried other tcp client/server scripts and the clients all seem to freeze after making a connection. Any ideas?

**EDIT** Not sure what the problem is...maybe it's my approach. So whats the proper way to use a gui to connect using tcp, then be able to send messages using tcprecv?

Edited by kjmarket

Pink Floyd - The Wall

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Unfortunately, there is no standard solution to your problem. TCP functions are slow and they block all other input while they are running (most of the time). However, a good thing to do when you are working with a GUI ánd TCP functions is using the OnEventMode option, and rewrite your script for it. This will save you trouble...

For examples, click the link to "TCP Remote Control" in my signature,

Edited by Manadar

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