Jump to content

TCP/UDP Binary?

Recommended Posts

Is it possible to receive Binary data in AutoIt from a program other than AutoIt (for example...a C++ program that sends out one float)?

I'm using beta version My C++ program continuously sends out one float and I would like to display this number in AutoIt. Is this possible solely through AutoIt code?

My code below does nothing when the UDP data of the float is received.

#include <GUIConstants.au3>
     $socket = UDPBind("", 3333)
     If @error <> 0 Then
         MsgBox(0,"Testing","Error binding...")
     #Region ### START Koda GUI section ### Form=
     $Form1 = GUICreate("Server", 338, 249, 193, 114)
     $Label1 = GUICtrlCreateLabel("", 72, 72, 400, 17)
     #EndRegion ### END Koda GUI section ###
     While 1
         $nMsg = GUIGetMsg()
         Switch $nMsg
             Case $GUI_EVENT_CLOSE
         $data = UDPRecv($socket, 50)
         If $data <> "" Then
             If IsBinary($data) Then
                 GUICtrlSetData($Label1,"Binary: " & String($data))
                 GUICtrlSetData($Label1,"String: " & $data)
     Func OnAutoItExit()



Edited by livewire
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

  • Recently Browsing   0 members

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