Jump to content

Unknown function TCPStartup()?


surfer
 Share

Recommended Posts

A more important question is : Do you use the latest beta ?

Nice sig Helge


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Hello,

I use AutoIt3.exe from the download site today.

I've tested some examples with some network code.

But the functions aren't available.

Do I need some libraries or .au3 files???????

My editor is Scite or AutoEd.

Plese help me to setup my environment to enable all functions.

Global $MainSocket
Local $MaxLength = 512; Maximum Length Of Text
Local $Port = 1000; Port Number
Local $Server = @IPAddress1; Server IpAddress
TCPStartup()
$MainSocket = TCPConnect($Server, $Port)
If $MainSocket = -1 Then Exit MsgBox(16, "Error", "Unable to connect.")
While 1
    $Data = TCPRecv($MainSocket, $MaxLength)
    If $Data = "~bye" Then
        MsgBox(16, "Session Ended", "Connection Terminated.")
        Exit
    ElseIf $Data <> "" Then
; Unconditional Receive
        MsgBox(0, "Received Packet", $Data)
    EndIf
WEnd
Func OnAutoItExit()
    If $MainSocket <> - 1 Then
        TCPSend($MainSocket, "~bye")
        TCPCloseSocket($MainSocket)
    EndIf
    TCPShutdown()
EndFunc;==>OnAutoItExit

Thats for instance the code with some functions

Thanks a lot !!!

Greetings surfer

Edited by surfer
Link to comment
Share on other sites

Hello,

I use AutoIt3.exe from the download site today.

I've tested some examples with some network code.

But the functions aren't available.

Do I need some libraries or .au3 files???????

My editor is Scite or AutoEd.

Plese help me to setup my environment to enable all functions.

Global $MainSocket
Local $MaxLength = 512; Maximum Length Of Text
Local $Port = 1000; Port Number
Local $Server = @IPAddress1; Server IpAddress
TCPStartup()
$MainSocket = TCPConnect($Server, $Port)
If $MainSocket = -1 Then Exit MsgBox(16, "Error", "Unable to connect.")
While 1
    $Data = TCPRecv($MainSocket, $MaxLength)
    If $Data = "~bye" Then
        MsgBox(16, "Session Ended", "Connection Terminated.")
        Exit
    ElseIf $Data <> "" Then
; Unconditional Receive
        MsgBox(0, "Received Packet", $Data)
    EndIf
WEnd
Func OnAutoItExit()
    If $MainSocket <> - 1 Then
        TCPSend($MainSocket, "~bye")
        TCPCloseSocket($MainSocket)
    EndIf
    TCPShutdown()
EndFunc;==>OnAutoItExit

Thats for instance the code with some functions

Thanks a lot !!!

Greetings surfer

You will need the beta version, you will find a link to it in my signature.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...