What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Replacing Text Using Scripts (I think I'm dumb lol)

Pages: (3): « First [ 1 ] 2 3 » Last »
[Help] Replacing Text Using Scripts (I think I'm dumb lol)
Author: Message:
Keikonium
Full Member
***


Posts: 229
Reputation: 3
35 / Male / Flag
Joined: Jul 2006
O.P. [Help] Replacing Text Using Scripts (I think I'm dumb lol)
Here is the code I am using:

code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if(sMessage == "hye");
{
  strReplace("hye" == "hey");
}
}


This shall be my first useful script (only other one I made was a popup toast that said "hello" lol).

This however, doesn't work :(. I have the scripting documentation open, but its sort of confusing me.

I want my script to replace "hye" with "hey". It shouldn't be that hard (I think :P), but I have nooo idea what I am doing wrong @_@. Some help :S?
07-11-2006 10:51 PM
Profile E-Mail PM Find Quote Report
noroom
Full Member
***

Avatar
www.noroom.tk

Posts: 107
Reputation: 4
Joined: Sep 2003
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
code:
function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if(sMessage == "hye");
{
  return "hey";
}
}

Read a few tutorials for JScript, or even Java/Javascript. They help a lot.
07-11-2006 10:53 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
how can u do this with numerous letters instead of words, for example i want a simple function that can change a to A, b to B, c to C in ever line as many times as it occurs, for an example as ive shown above make the entire line from lower to upperclass :D thanks for any help
07-11-2006 11:11 PM
Profile E-Mail PM Find Quote Report
Keikonium
Full Member
***


Posts: 229
Reputation: 3
35 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
I just figured it out :). I had my code all wrong >_>.

I can now replace words, letters, symbols, anything... with anything else :).

I am creating a script for this thread: Click Here

It is almost done :). Just need to find good replacements for each letter of the english alphabet, and I will be good to go. Then I can work on a script for me :).

@Joereynolds89: This is quite simple (after you know how to do it :S. And I had no clue like 5 minutes ago lol). Use this code:
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
sMessage = sMessage.replace("a","A");
sMessage = sMessage.replace("b","B");
...
sMessage = sMessage.replace("y","Y");
sMessage = sMessage.replace("z","Z");
return sMessage;
}


Just do it for each letter of the alphabet :).
07-11-2006 11:16 PM
Profile E-Mail PM Find Quote Report
jmccarroll
Full Member
***


Posts: 141
40 / Male / –
Joined: Jun 2003
RE: RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
quote:
Originally posted by Joereynolds89
how can u do this with numerous letters instead of words, for example i want a simple function that can change a to A, b to B, c to C in ever line as many times as it occurs, for an example as ive shown above make the entire line from lower to upperclass :D thanks for any help

Caps Lock?
07-11-2006 11:17 PM
Profile PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
@ Keikonium
thankyou soo much :D

EDIT: i did it but it only works for the first a, so if i put a i get A but if i put aaa i get Aaa :( any ideas?

@ jmccarroll
Yes, i could use caps lock but that wasnt my point, that was an example to explain what i wanted, what it will actually do is completely change the letter :P

This post was edited on 07-11-2006 at 11:24 PM by Joereynolds89.
07-11-2006 11:17 PM
Profile E-Mail PM Find Quote Report
Keikonium
Full Member
***


Posts: 229
Reputation: 3
35 / Male / Flag
Joined: Jul 2006
O.P. RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
I have no idea Joereynolds89 :S. I will look into it, but can't promise a solution :S. My script just blew up lol. I am not sure what I changed, but now it doesn't work at all >.<! I wish there was an undo button >_>.
07-11-2006 11:33 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
lol, i ended up just using quick texts until i no how :D then i can make it so every1 else can use :D
07-11-2006 11:37 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
quote:
Originally posted by Keikonium
I have no idea Joereynolds89 :S. I will look into it, but can't promise a solution :S. My script just blew up lol. I am not sure what I changed, but now it doesn't work at all >.<! I wish there was an undo button >_>.


Well if you hold Ctrl then press (or keep pressing) "z" then it will go back ;)
Touch Innovation - touch friendly programs/applications for the windows mobile!


07-11-2006 11:41 PM
Profile E-Mail PM Web Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [Help] Replacing Text Using Scripts (I think I'm dumb lol)
Hmm you can look at this if you want. I wrote it awhile ago, but decided not to release it. Anyway if you want to use it look at the Al Bhed talker in the talkers folder otherwise you can look at the code for your own idea.

.plsc File Attachment: Talker.plsc (7.03 KB)
This file has been downloaded 155 time(s).
07-11-2006 11:46 PM
Profile E-Mail PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » 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