What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] In / Out Text Replacer

Pages: (2): « First « 1 [ 2 ] Last »
[Request] In / Out Text Replacer
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Request] In / Out Text Replacer
quote:
From the Plus! Scripting Documentation:

OnEvent_ChatWndReceiveMessage
Return Value:

A string containing the message to be displayed in the chat window instead of Message. If you do not want to modify the message, simply return Message without changing it. The new string will be parsed for possible format codes. It is important to remember that the new message cannot be longer than the original one (Message.length) and will be cut if necessary. Also, Messenger will not re-parse the message for emoticons codes.

PS: seeing http://en.wikipedia.org/wiki/Romaji and other resources, it seems not so easy to convert romaji back though, as there are several systems possible. So you'd need something which automatically reconizes the used system, etc. All in all, not an easy script to make I think.

The Javascript used on this page might be a great help... also check out the links that page points to.

This post was edited on 06-25-2007 at 12:32 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-25-2007 11:32 AM
Profile PM Find Quote Report
Yukai
New Member
*


Posts: 8
– / Male / –
Joined: Mar 2007
O.P. RE: [Request] In / Out Text Replacer
ow, this might be a little more difficult than i thought.
06-25-2007 12:31 PM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [Request] In / Out Text Replacer
You also have to remember that changing to kanji is probably not the best to change it into as there are at least 2 ways that every kanji can be pronounced and there are many kanji that make the same sound and hence same romaji.  The only way to do a script that you were after by any means is a romaji to hiragana or a romaji to katakana script that could translate either way.

However there is one other possibility and that is to make sure that your friend uses a hiragana/katakana/kanji to romaji converter before sending a message to you and hence being able to have the longer message.

These are just some things to think about when making the script (whoever decides to devote their time to the project).


[off-topic]
quote:
Originally posted by CookieRevised
The next pseudo code is almost always used in scripts like this (you can verify this in the scripting database). But it will, in most cases, render wrong results:

(Post cut short.... sorry Cookie)

This is easily fixed by using a function in your replace method instead

code:
var oString = "abcd";
var eString = oString.replace(/a|b|c|d/g,function($1){
                    switch($1){
                        case "a":
                            return "b";
                        case "b":
                            return "c";
                        case "c":
                            return "d";
                        case "d"
                            return "a";
                    }
                });
return eString;
This will return "bcda".

[/off-topic]
[Image: markee.png]
06-26-2007 02:10 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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