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:
TheGuruSupremacy
Full Member
***

Avatar

Posts: 367
Reputation: 19
34 / Male / Flag
Joined: Nov 2006
O.P. RE: RE: Hex Help
quote:
Originally posted by Mattike
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;
}


I thank you but this code for me don't work

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
  }
  Debug.Trace(newstring)
  return newstring;
}
01-16-2007 05:16 PM
Profile PM 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