Shoutbox

quoting - 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: quoting (/showthread.php?tid=92989)

quoting by strangel3t on 11-23-2009 at 01:54 AM

Sup,

I'm trying to find a script to make the color of my text change if it begins with '>>'

Is there already such thing ? Something similar? I could sript it easily but I don't know where to start.


RE: quoting by NanaFreak on 11-23-2009 at 03:10 AM

here you go:

code:
// this can have multiple values... note: these are all red colour
//   var color = 4;
//   var color = "red";
//   var color = "#ff0000";
var color = "4";

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.substr(0,2) === ">>") return "[c="+color+"]"+Message+"[/c]";
}

just make a new script with that in it and it will change the color, and if you want to make it a different color, read the notes at the top [=
RE: quoting by strangel3t on 11-23-2009 at 01:10 PM

Thanks dude,

this is the code i'm using:


var color = "#889967";

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.substr(0,2) === ">>") return "[c="+color+"]"+Message+"[/c]";
}


A friend of mine reported that he was receiveing text like this: [c=#889967]>>mymessage/c]

Does this only works with people using plus? Isn't there another way of changing color, send message, restore color?


RE: quoting by matty on 11-23-2009 at 02:27 PM

Yes this only works if the user is using Messenger Plus! Live.


RE: quoting by CookieRevised on 11-23-2009 at 03:37 PM

quote:
Originally posted by strangel3t
Isn't there another way of changing color, send message, restore color?
Yes. It involves tampering with the registry and Messenger's own font settings. As a result, your contact does not need any addon to see the color.

The script must do:
  1. Read the REG_BINARY registry value
    HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings\<your_windows live_id_hash>\IM Color
  2. Set a new value for 'IM Color'
  3. Send the message
  4. Set the old value of 'IM Color' back.

RE: quoting by matty on 11-23-2009 at 03:42 PM

quote:
Originally posted by CookieRevised
quote:
Originally posted by strangel3t
Isn't there another way of changing color, send message, restore color?
Yes. It involves tampering with the registry and Messenger's own font settings. As a result, your contact does not need any addon to see the color.

The script must do:
  1. Read the REG_BINARY registry value
    HKCU\Software\Microsoft\MSNMessenger\PerPassportSettings\<your_windows live_id_hash>\IM Color
  2. Set a new value for 'IM Color'
  3. Send the message
  4. Set the old value of 'IM Color' back.

Wouldn't the script need to close the chat window first prior to sending the message? I was under the impression just changing the key only takes effect after the window is opened or you change the font colour using Messenger itself.
RE: quoting by CookieRevised on 11-23-2009 at 04:15 PM

quote:
Originally posted by matty
Wouldn't the script need to close the chat window first prior to sending the message? I was under the impression just changing the key only takes effect after the window is opened or you change the font colour using Messenger itself.
Nope (at least not with the current version; might have been the case in previous versions though).

IM Color is read each time when sending a message.

EDIT: hang on... now that I tested this for the third time, it doesn't work anymore.... :o
The first two times it worked perfectly. :S wtf

EDIT2: ok, this is very weird... now it worked again for like 3 messages, then it didn't anymore....

Something in Messenger causes Messenger to reread those registry entries each time you send a message (without closing/reopening the window), but apparently only in certain cases. If anyone can figure this one out....