What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » a problem scripting :/ [NOW SOLVED THANKS]

a problem scripting :/ [NOW SOLVED THANKS]
Author: Message:
Red King
Junior Member
**


Posts: 21
– / Male / –
Joined: Feb 2007
O.P. RE: RE: a problem scripting :/
quote:
Originally posted by markee
This is because you will just be doing one replace after the other on the one string. For example if you had the string "ABC" and replaced "A" with "B" and then "B" with "C" you will just end up with "CCC" rather than the "BCC" you were after.

To overcome this you will have to put the changes into a new variable.  This code should help with what you need (using what you have written).

code:
var alpha = "abcdefghijklmnopqrstuvwxyz";
var code = "ypltavkrezgmshubxncdijfqow";
var Split = Message.split("");
var eSplit = new Array();
for(i=0;i<Split.length;i++){
    for(j=0;j<alpha.length;j++){
        if(Split[i] == alpha.charAt(j)){
            eSplit[i] = code.charAt(j);
            break;
        }
    }
}
var eMessage = eSplit.join("");
Debug.Trace(eMessage);

I hope this extract helps you.

thank you :)
i really appreciate it i'll try it out now

edit: i tried that and it's not replacing anything now is there anything else i'm supposed to add to all this?

This post was edited on 02-13-2007 at 10:59 PM by Red King.
02-13-2007 10:48 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
a problem scripting :/ [NOW SOLVED THANKS] - by Red King on 02-13-2007 at 10:14 PM
RE: a problem scripting :/ - by pollolibredegrasa on 02-13-2007 at 10:23 PM
RE: a problem scripting :/ - by Eljay on 02-13-2007 at 10:24 PM
RE: a problem scripting :/ - by Red King on 02-13-2007 at 10:25 PM
RE: a problem scripting :/ - by markee on 02-13-2007 at 10:39 PM
RE: RE: a problem scripting :/ - by Red King on 02-13-2007 at 10:48 PM
RE: a problem scripting :/ - by Matti on 02-14-2007 at 02:18 PM
RE: RE: a problem scripting :/ - by Red King on 02-14-2007 at 08:47 PM
RE: a problem scripting :/ [NOW SOLVED THANKS] - by markee on 02-14-2007 at 11:04 PM
RE: a problem scripting :/ [NOW SOLVED THANKS] - by Red King on 02-14-2007 at 11:09 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