Ciao come faccio a convertirlo in basic4A
problemi con= len-mid-val-chr-&h
chiamo funzione
Hex2AsciiSocket (li1.Text)
Function Hex2AsciiSocket(s_input As String) ' Input: "00 01 AA FF
Dim I As Byte
Dim HEX As String
Dim OUT As String
Dim znak As Byte
HEX = s_input
For I = 1 To (Len(s_input) + 1) \ 3
znak = Val("&H" & Mid(HEX, 1, 2))
HEX = Mid(HEX, 4, Len(HEX))
OUT = OUT & Chr(znak)
Next I
'MsgBox OUT
SOCK.SendData (OUT)'winsock
Hex2AsciiSocket = Len(OUT)
End Function
grazie mille per le risposte
problemi con= len-mid-val-chr-&h
chiamo funzione
Hex2AsciiSocket (li1.Text)
Function Hex2AsciiSocket(s_input As String) ' Input: "00 01 AA FF
Dim I As Byte
Dim HEX As String
Dim OUT As String
Dim znak As Byte
HEX = s_input
For I = 1 To (Len(s_input) + 1) \ 3
znak = Val("&H" & Mid(HEX, 1, 2))
HEX = Mid(HEX, 4, Len(HEX))
OUT = OUT & Chr(znak)
Next I
'MsgBox OUT
SOCK.SendData (OUT)'winsock
Hex2AsciiSocket = Len(OUT)
End Function
grazie mille per le risposte