Shoutbox

[?] Convert to Byte... Then Read Stuff - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] Convert to Byte... Then Read Stuff (/showthread.php?tid=86314)

[?] Convert to Byte... Then Read Stuff by Spunky on 09-30-2008 at 11:57 PM

I'm gonna be lazy for once (nah, I have actually tried hard for this :p)... I'm getting header information posted to me from a server and I need to take the first 48 characters, send them to a datablock object and then be able to read information from them.

I still can't quite get the hang of this datablock business so I've attached a file with a few examples of what I want (All whitespace on a line needs to be included)... If somebody could write me a nice function it'd be awesome.

(Y) :p


RE: [?] Convert to Byte... Then Read Stuff by SmokingCookie on 10-12-2008 at 10:51 AM

What exactly do you have in mind?

code:
var MyDataBlock = Interop.Allocate(98); // String size is 48. Add NULL character: 1, makes 49. Unicode, so multiply by 2, makes 98.
MyDataBlock.writeSTRING(0 /* offset */,myString.substr(0,48) /* header */ );