What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » code for replacing specific text with contactc name!

code for replacing specific text with contactc name!
Author: Message:
Lux
Junior Member
**

=\

Posts: 91
Reputation: 7
– / Male / Flag
Joined: May 2007
O.P. Sad  code for replacing specific text with contactc name!
well....i'm writting a script wich would do the folowing thing....

if u know the mIRC "/me" predifined action texts u will know what I want...
I alterd the code of those texts so it would be compatabile with msg+( not big work just some of the commands needed to be removed or added, like removing the /say command, new line, and ect. )......so I need few tjhing if some1 can helo me....

it would be like this....


in the script codes, there would be text to send on commande wich would be sended to contact in conversation window from the my script  options, and i need the code wich would replace SOME text ( like #NAME# ) , wich is meant for name of persone wich u r sending a text to, in ALL of the predifend texts, whit NAME,  not email, of the contact wich u are talking to....so can u help me?

i putted the pic so u could understuund me better....


[Image: attachment.php?pid=819288]


P.S. sorry 'bout my english!I'm holping u understund me!

.jpg File Attachment: Moj_Screenshot_6.jpg (10.56 KB)
This file has been downloaded 373 time(s).

This post was edited on 05-23-2007 at 10:07 PM by Lux.
05-23-2007 10:06 PM
Profile PM Find Quote Report
Sunshine
Elite Member
*****

Avatar

Posts: 5142
Reputation: 122
– / Female / Flag
Joined: Mar 2004
Status: Away
RE: code for replacing specific text with contactc name!
You dont need to make a script to do that, a quicktext can do this. You can do that by using the tag (!N), wich displays your contacts friendlyname (name as set by contact him/herself).

Example of a quicktext using this:

[Image: attachment.php?pid=819291]

With this i can send the old/known /slap command.

.png File Attachment: slapquicktext.PNG (22.65 KB)
This file has been downloaded 355 time(s).

This post was edited on 05-23-2007 at 10:27 PM by Sunshine.
[Image: 25dr3o9]
05-23-2007 10:25 PM
Profile E-Mail PM Web Find Quote Report
Lux
Junior Member
**

=\

Posts: 91
Reputation: 7
– / Male / Flag
Joined: May 2007
O.P. RE: code for replacing specific text with contactc name!
10x Sunshine ! :D
can that be addes in script file? cuz I alredy write the script! i just need to put the (!N) in it? would that work?
05-23-2007 10:34 PM
Profile PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: RE: code for replacing specific text with contactc name!
quote:
Originally posted by Luka88bg
can that be addes in script file? cuz I alredy write the script! i just need to put the (!N) in it? would that work?

Yes, (!N) is what you need to display nicknames. If you want emails use (!M).
05-24-2007 01:42 AM
Profile PM Find Quote Report
Orgrim Doomhammer
Junior Member
**

Avatar
For The Horde!

Posts: 67
34 / Male / Flag
Joined: Aug 2006
RE: code for replacing specific text with contactc name!
just a question... is there stg like (!N) that lets you display specific contacts nicknames? because if I use something like slap in a convo with more than one contact it will write the nick of every contact who's participating. I was wondering if there's a code like (!N1) etc. that shows the nick of the 1st contact participating to the convo etc.
05-24-2007 04:34 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: code for replacing specific text with contactc name!
quote:
Originally posted by Orgrim Doomhammer
just a question... is there stg like (!N) that lets you display specific contacts nicknames? because if I use something like slap in a convo with more than one contact it will write the nick of every contact who's participating. I was wondering if there's a code like (!N1) etc. that shows the nick of the 1st contact participating to the convo etc.
No, if you want to reply with only one of them you'll need to code it that way using an enumeration of the ChatWnd::Contacts object. More info in the Scripting Documentation.

eg:
code:
for (var e = new Enumerator(oChatWnd.Contacts); !e.atEnd(); e.moveNext()) {
        var Contact = e.item();
        Debug.Trace(Contact.Name);
}
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-24-2007 05:40 PM
Profile PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: code for replacing specific text with contactc name!
The problem with this is how the script is going to figure out which contact you want to slap or whatever...
05-25-2007 04:56 AM
Profile PM Find Quote Report
Orgrim Doomhammer
Junior Member
**

Avatar
For The Horde!

Posts: 67
34 / Male / Flag
Joined: Aug 2006
RE: code for replacing specific text with contactc name!
ok, I've understood.thx to cookie & volv 4 replying me
05-25-2007 12:51 PM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: code for replacing specific text with contactc name!
Well, if you only want it to slap the first person found, you can use
code:
var ContactName = new Enumerator(ChatWnd.Contacts).item().Name
which will save the name of the first contact found to the variable ContactName
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-25-2007 03:59 PM
Profile E-Mail PM Web 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