Jump to content

Merge two or more binary parts, how?!


JScript
 Share

Recommended Posts

Can someone explain me how I do this?

Here's the code:

#Include <Memory.au3>
 
$bVar = StringToBinary("JScript")
$TcpRxLen = 256
 
$tMemB = DllStructCreate("byte[" & $TcpRxLen & "]") ; Create struct
DllStructSetData($tMemB, 1, $bVar)
 
$bOld = DllStructGetData($tMemB, 1)
DllStructSetData($tMemB, 1, $bOld & StringToBinary(" - João Carlos."))
 
MsgBox(4096, "Teste", BinaryToString(DllStructGetData($tMemB, 1)))

Thanks,

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

Bitwise logical operators don't work like that in AutoIt. Look up BitAnd, BitOr etc.

$var1 & $ var2 will give string concatenation if $var1 is a string otyherwise a boolean result.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...