What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » A Radio Code script

A Radio Code script
Author: Message:
EaglesNestOne
New Member
*


Posts: 6
44 / – / –
Joined: May 2007
O.P. Wink  A Radio Code script
Hi,

<off topic>
Although this is my first post on this forum and you all might think i'm a noob I am very experienced with forums. (I even used to be a moderator of one)
</off topic>

I was wondering if somebody could teach me to (or make) a script that goes something like this:

If you type something (when in a conversation) like "/rdocde <message>" would it be possible to change the text to radio code?

Example:
     "ABC 123" would be changed to Alpha Bravo Charlie   One Two Three."

Anyway heres the translation of Radio Code:

A.............................. ALPHA
B.............................. BRAVO
C.............................. CHARLIE
D.............................. DELTA
E.............................. ECHO
F.............................. FOXTROT
G.............................. GOLF
H.............................. HOTEL
I.............................. INDIA
J.............................. JULIET
K.............................. KELO
L.............................. LIMA
M.............................. MIKE
N.............................. NOVEMBER
O.............................. OSCAR
P.............................. PAPA
Q.............................. QUEBEC
R.............................. ROMEO
S.............................. SIRREA
T.............................. TANGO
U.............................. UNIFORM
V.............................. VICTOR
W.............................. WHISKEY
X.............................. XRAY
Y.............................. YANKEE
Z.............................. ZULU

This post was edited on 05-18-2007 at 08:59 AM by EaglesNestOne.
05-18-2007 08:58 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: A Radio Code script
Have a try at this:
code:
var letters = {
    "a":"ALPHA",
    "b":"BRAVO",
    "c":"CHARLIE",
    "d":"DELTA",
    "e":"ECHO",
    "f":"FOXTROT",
    "g":"GOLF",
    "h":"HOTEL",
    "i":"INDIA",
    "j":"JULIET",
    "k":"KELO",
    "l":"LIMA",
    "m":"MIKE",
    "n":"NOVEMBER",
    "o":"OSCAR",
    "p":"PAP",
    "q":"QUEBEC",
    "r":"ROMEO",
    "s":"SIRREA",
    "t":"TANGO",
    "u":"UNIFORM",
    "v":"VICTOR",
    "w":"WHISKEY",
    "x":"XRAY",
    "y":"YANKEE",
    "z":"ZULU",
    "1":"ONE",
    "2":"TWO",
    "3":"THREE",
    "4":"FOUR",
    "5":"FIVE",
    "6":"SIX",
    "7":"SEVEN",
    "8":"EIGHT",
    "9":"NINE",
    "0":"ZERO"
}
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage){
    if (/^\/rdocde(?:\s+([\s\S]*)|$)/i.exec(sMessage) !== null) {
        var parameter = RegExp.$1.toLowerCase();
        for(key in letters){
        Debug.Trace(key+"\t"+letters[key]);
            //remove this line if you want double spaces at the end of words
            parameter = parameter.replace(RegExp(key+"\b","g"),letters[key]);
            parameter = parameter.replace(RegExp(key,"g"),letters[key]+" ");
        }
        ChatWnd.SendMessage(parameter);
        return "";
    }
}
function OnGetScriptCommands(){
    return "<ScriptCommands><Command><Name>Radio Code</Name><Description>Convert your message to radio code</Description><Parameters>Message</Parameters></Command>";
}
[Image: markee.png]
05-18-2007 09:56 AM
Profile PM Find Quote Report
EaglesNestOne
New Member
*


Posts: 6
44 / – / –
Joined: May 2007
O.P. RE: A Radio Code script
THX MAN

This post was edited on 05-18-2007 at 10:02 AM by EaglesNestOne.
05-18-2007 09:58 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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