Shoutbox

helping out a newb - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: helping out a newb (/showthread.php?tid=78287)

helping out a newb by general sirhc on 10-18-2007 at 12:01 PM

i tried making a script that basicly converts a key press to a different string.
The first idea was to convert your text 70 |-|4(|< (to hacker) so when ever the user presses a letter it changes it to the hacker version a=4 b=8 c=( and so on. ANYWAY making this script was beyond me so i tried to make a script that changed the letter to a different one but this also was too difficult so now i ask my new friends here to help me understand how to do a script like this.

so yeah anyone that can help post an idea or an entire script and help is good help

thanks for answers to come

EDIT: ok

code:
function OnEvent_ChatWndEditKeyDown(ChatWnd,KeyCode,CtrlKeyDown,ShiftKeyDown){
if (Var Convert==on){
if (KeyCode==65){
//65 is a
this bit i'm unsure about but yer um add '4' instead of adding the letter A
}}

RE: helping out a newb by albert on 10-18-2007 at 12:03 PM

Your explanation is very unclear.. Please make it more understandable and show a clear example..


RE: helping out a newb by markee on 10-18-2007 at 12:36 PM

I think he wants a 1337 converter to work when he is typig rather than when the message is sent. What you want to do in the area that you are unsure of is use the following code.

code:
ChatWnd.EditText_ReplaceSel("4");//Insert 4 where the caret is (the blinking thig deoting where you are typing)
return true;//Do not let messenger put in the a

You also may want to look at a switch statement rather than many if statements for each key, it will just turn out nicer if you understand how to use them.  This isn't needed but it is an ideal opportunity to give it a go and learn how to do it.
RE: helping out a newb by general sirhc on 10-18-2007 at 12:47 PM

dont worry i learnt how to do switch in another program language and it works just fine in this aswell
AUSSIE AUSSIE AUSSIE....THANKS THANKS THANKS


RE: helping out a newb by Spunky on 10-18-2007 at 06:22 PM

quote:
Originally posted by markee
I think he wants a 1337 converter to work when he is typig rather than when the message is sent.

quote=tylertyler]This might help you:
code:

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{

Message = Message.replace(/R/gi,'some char');

return Message;
}





He solved it and was thanked; there was no need to post your code really as it doesn't do what he asked anyway