What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Get the contacts color

Get the contacts color
Author: Message:
MrT
Junior Member
**

Coding For Fun

Posts: 62
35 / Male / Flag
Joined: Jul 2006
RE: Get the contacts color
ok.it's a litle article :D

---code---


function xniff:: OnData(srcip, srcport, destip, destport, data, datalen) {
        if (srcport === "1863" && datalen > 0) {

...


---code---

data =

MSG ycanayak@hotmail.com Nick 134  MIME-Version: 1.0  Content-Type: text/plain; charset=UTF-8  X-MMS-IM-Format: FN=Times%20New%20Roman; EF=B; CO=ff; CS=a2; PF=12    hello


_______________

first thing -> MSG  (this data is message data)
second thing -> contac's mail
third thing -> contact's nick
last thing -> message (hello)

FN = contact's font name (verdana,times new roman,comic sans ms ...)

EF -> contact's font style
  EF=B; (bold)
  EF=I; (İtalic)
  EF=BI; (bold and italic)
  EF=; (normal)

CO -> contact's font color
***BUT***

CO=      |   HEX CODE          |   COLOR

0           |  #00-00-00          |    black
ff           |  #FF-00-00     |     red
ff8000   |  #FF-80-00       |      blue
80         |  #80-00-00     |   dark red
800080 |  #800080   |   purple
4080     |  #8040-00    |  i don't know this color's name :D


CO=xxyyzz     --convert this-->     #zzyyxx
CO=xxyy        --convert this-->    #yyxx00
CO=xx            --convert this-->    #xx0000


____________


---code---


var data = data.split(" ");

if (data[0] == "MSG" && data[8] == "Content-Type:" && data[9] == "text/plain;" && data[10] == "charset=UTF-8") {  // hmm.it's a incoming message

var style = data[14]; //  EF=B;
var font_name = data[13]; //  FN=Times%20New%20Roman;
var color = data[15]; // CO=ff   You must convert this to hex code

Debug.Trace("Font Style: " + style);
Debug.Trace("Font Name: " + font_name);
Debug.Trace("Font Color: " + color);

}


---code---


you need bold ones (B , times new.. , ff)

___________________


sorry for my english :(
i hope you can understand

11-12-2006 10:18 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Get the contacts color - by SnuZZer on 11-12-2006 at 09:21 AM
RE: Get the contacts color - by transit on 11-12-2006 at 01:47 PM
RE: Get the contacts color - by Spunky on 11-12-2006 at 02:34 PM
RE: RE: Get the contacts color - by Huhu_Manix on 11-12-2006 at 03:27 PM
RE: RE: Get the contacts color - by MrT on 11-12-2006 at 03:29 PM
RE: Get the contacts color - by SnuZZer on 11-12-2006 at 06:39 PM
RE: Get the contacts color - by bgmrk on 11-12-2006 at 08:07 PM
RE: Get the contacts color - by MrT on 11-12-2006 at 10:18 PM
RE: Get the contacts color - by Chris4 on 11-12-2006 at 10:33 PM
RE: Get the contacts color - by SnuZZer on 11-13-2006 at 06:12 AM
RE: Get the contacts color - by Plan-1130 on 11-13-2006 at 08:46 AM
RE: Get the contacts color - by SnuZZer on 11-13-2006 at 02:01 PM
RE: Get the contacts color - by Plan-1130 on 11-13-2006 at 02:10 PM
RE: Get the contacts color - by SnuZZer on 11-13-2006 at 03:32 PM
RE: Get the contacts color - by MrT on 11-13-2006 at 08:26 PM
RE: Get the contacts color - by MicroWay on 11-13-2006 at 08:52 PM
RE: Get the contacts color - by EBFL on 11-13-2006 at 08:53 PM
RE: Get the contacts color - by MrT on 11-13-2006 at 08:59 PM
RE: Get the contacts color - by SnuZZer on 11-15-2006 at 05:53 AM
RE: Get the contacts color - by MrT on 11-15-2006 at 03:27 PM
RE: Get the contacts color - by SnuZZer on 11-15-2006 at 04:17 PM
RE: Get the contacts color - by Plan-1130 on 11-15-2006 at 11:19 PM
RE: Get the contacts color - by CookieRevised on 11-16-2006 at 02:18 AM


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