What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Hex Help

Hex Help
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Hex Help
So, if I understand, you have a string like
code:
var thing = "FF00FC";
and you need a function which makes it like this:
code:
var new_thing = "\xFF\x00\xFC";

If so, this should do:
code:
function SetDataPatch(string) {
  var newstring = "";
  for(var i=0; i<string.length; i+=2) {
    var hex = string.substr(i, 2); //The hexadecimal character code
    var dec = parseInt(hex, 16); //The decimal character code
    newstring += String.fromCharCode(dec); //Adds the character to the string
  }
  return newstring;
}

This post was edited on 01-16-2007 at 05:04 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-16-2007 05:04 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Hex Help - by TheGuruSupremacy on 01-16-2007 at 04:20 PM
RE: Hex Help - by Matti on 01-16-2007 at 05:04 PM
RE: RE: Hex Help - by TheGuruSupremacy on 01-16-2007 at 05:16 PM
RE: Hex Help - by Plik on 01-16-2007 at 07:28 PM
RE: Hex Help - by phalanxii on 01-17-2007 at 04:15 AM
RE: RE: Hex Help - by CookieRevised on 01-17-2007 at 05:13 AM
RE: RE: RE: Hex Help - by TheGuruSupremacy on 01-17-2007 at 01:51 PM
RE: Hex Help - by TheGuruSupremacy on 01-17-2007 at 06:06 PM
RE: Hex Help - by CookieRevised on 01-17-2007 at 07:00 PM
RE: RE: Hex Help - by TheGuruSupremacy on 01-17-2007 at 07:16 PM
RE: Hex Help - by CookieRevised on 01-17-2007 at 08:29 PM
RE: RE: Hex Help - by TheGuruSupremacy on 01-17-2007 at 09:35 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On