Get the contacts color - 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: Get the contacts color (/showthread.php?tid=68340)
Get the contacts color by SnuZZer on 11-12-2006 at 09:21 AM
Hi.
I'm from Denmark and my english isn't good, but I'll try.
I don't think that I have seen a clone-script which can get the contatcts message-color, even if the contact have sent a message?
Thanks in advance
RE: Get the contacts color by transit on 11-12-2006 at 01:47 PM
Yes. Most scripts are only imitating the user's DP , NN and PSM
DP - Display Picture
NN - Nickname
PSM - Personal Message
No one (Or I Have Not Ever Seen) have ever made cloning script with the contact messenger's color.
But you could always manually do it.
~ Sorry to disappoint.
Regards,
Transit
RE: Get the contacts color by Spunky on 11-12-2006 at 02:34 PM
There are many threads about this subject. Search. AFAIK it requires packet sniffing and sombody (forgot who) has managed to get close(ish) to getting an idea that works
RE: RE: Get the contacts color by Huhu_Manix on 11-12-2006 at 03:27 PM
quote: Originally posted by SpunkyLoveMuff
There are many threads about this subject. Search. AFAIK it requires packet sniffing and sombody (forgot who) has managed to get close(ish) to getting an idea that works
Him > http://shoutbox.menthix.net/showthread.php?tid=68087
RE: RE: Get the contacts color by MrT on 11-12-2006 at 03:29 PM
quote: Originally posted by SpunkyLoveMuff
There are many threads about this subject. Search. AFAIK it requires packet sniffing and sombody (forgot who) has managed to get close(ish) to getting an idea that works
it's my imitate script
http://shoutbox.menthix.net/showthread.php?tid=68087
RE: Get the contacts color by SnuZZer on 11-12-2006 at 06:39 PM
Hi.
I can't find out where in MrT's imitate-script he get the color, and how.
The most of it is Turkish
RE: Get the contacts color by bgmrk on 11-12-2006 at 08:07 PM
well message mr T and he'll tell u if he wants
RE: Get the contacts color by MrT on 11-12-2006 at 10:18 PM
ok.it's a litle article
---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
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
RE: Get the contacts color by Chris4 on 11-12-2006 at 10:33 PM
I just copy and paste the text into word, then get the colour, font, etc.
RE: Get the contacts color by SnuZZer on 11-13-2006 at 06:12 AM
Hi.
MrT ->
This is my code:
code: function OnData(srcip, srcport, destip, destport, data, datalen)
{
if (srcport === "1863" && datalen > 0)
{
var data = data.split(" ");
if (data[0] == "MSG" && data[8] == "Content-Type:" && data[9] == "text/plain;" && data[10] == "charset=UTF-8")
{
var style = data[14];
var font_name = data[13];
var color = data[15];
Debug.Trace("Font Style: " + style);
Debug.Trace("Font Name: " + font_name);
Debug.Trace("Font Color: " + color);
}
}
}
But I can't find out how and where I shall call the function
RE: Get the contacts color by Plan-1130 on 11-13-2006 at 08:46 AM
code: function Xniff::OnData(srcip, srcport, destip, destport, data, datalen)
It's an event, so it's being executed by the object Xniff.
For that you need to include the Xniff DLL in your project, see: [Release] Xniff (ActiveX Packet Sniffer) - Examples inside
RE: Get the contacts color by SnuZZer on 11-13-2006 at 02:01 PM
Hi.
I'm sorry, but I'm lost!
This is my code:
code: var xniff = new ActiveXObject("w00t.Xniff");
function xniff:nData(srcip, srcport, destip, destport, data, datalen)
{
if (srcport === "1863" && datalen > 0)
{
var data = data.split(" ");
if (data[0] == "MSG" && data[8] == "Content-Type:" && data[9] == "text/plain;" && data[10] == "charset=UTF-8")
{
var style = data[14];
var font_name = data[13];
var color = data[15];
Debug.Trace("Font Style: " + style);
Debug.Trace("Font Name: " + font_name);
Debug.Trace("Font Color: " + color);
}
}
}
function OnEvent_Initialize(MessengerStart)
{
xniff.Start();
}
function OnEvent_Uninitialize(MessengerExit)
{
xniff.Stop();
}
Is it something like that?
When I start the script the debugger says:
"xniff isn't defined
Line: 3. Code: -2146823279."
RE: Get the contacts color by Plan-1130 on 11-13-2006 at 02:10 PM
Well, you forgot a few things:
code: var xniff = new ActiveXObject("w00t.Xniff");
xniff.IP = getLocalIp();
function xniff:nData(srcip, srcport, destip, destport, data, datalen)
{
if (srcport === "1863" && datalen > 0)
{
var data = data.split(" ");
if (data[0] == "MSG" && data[8] == "Content-Type:" && data[9] == "text/plain;" && data[10] == "charset=UTF-8")
{
var style = data[14];
var font_name = data[13];
var color = data[15];
Debug.Trace("Font Style: " + style);
Debug.Trace("Font Name: " + font_name);
Debug.Trace("Font Color: " + color);
}
}
}
function OnEvent_Initialize(MessengerStart)
{
xniff.Start();
}
function OnEvent_Uninitialize(MessengerExit)
{
xniff.Stop();
}
function getLocalIp()
{
var wmiObj = new ActiveXObject('WbemScripting.SWbemLocator');
var wmiInst = wmiObj.ConnectServer('.', "root\\cimv2");
wmiInst.Security_.ImpersonationLevel = 3;
var col = wmiInst.ExecQuery('Select * from Win32_NetworkAdapterConfiguration');
var colEnum = new Enumerator(col);
var ipAddr;
for (; !colEnum.atEnd(); colEnum.moveNext())
{
var objIp = colEnum.item();
var addr = objIp.IPAddress(0);
if(typeof addr == 'string' && addr.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/))
{
ipAddr = addr;
}
}
return ipAddr;
}
RE: Get the contacts color by SnuZZer on 11-13-2006 at 03:32 PM
Hi.
I'm sorry, but I can't find out how to use Xniff.
It still says that xniff isn't defined.
This is my code:
code: var xniff = new ActiveXObject("w00t.Xniff");
xniff.IP = getLocalIp();
function xniff:nData(srcip, srcport, destip, destport, data, datalen)
{
if (srcport === "1863" && datalen > 0)
{
var data = data.split(" ");
if (data[0] == "MSG" && data[8] == "Content-Type:" && data[9] == "text/plain;" && data[10] == "charset=UTF-8")
{
var style = data[14];
var font_name = data[13];
var color = data[15];
Debug.Trace("Font Style: " + style);
Debug.Trace("Font Name: " + font_name);
Debug.Trace("Font Color: " + color);
}
}
}
function OnEvent_Initialize(MessengerStart)
{
xniff.Start();
}
function OnEvent_Uninitialize(MessengerExit)
{
xniff.Stop();
}
function getLocalIp()
{
var wmiObj = new ActiveXObject('WbemScripting.SWbemLocator');
var wmiInst = wmiObj.ConnectServer('.', "root\\cimv2");
wmiInst.Security_.ImpersonationLevel = 3;
var col = wmiInst.ExecQuery('Select * from Win32_NetworkAdapterConfiguration');
var colEnum = new Enumerator(col);
var ipAddr;
for (; !colEnum.atEnd(); colEnum.moveNext())
{
var objIp = colEnum.item();
var addr = objIp.IPAddress(0);
if(typeof addr == 'string' && addr.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/))
{
ipAddr = addr;
}
}
return ipAddr;
}
RE: Get the contacts color by MrT on 11-13-2006 at 08:26 PM
SnuZZer,
try this script.
you can understand with this.
Debug Window:
RE: Get the contacts color by MicroWay on 11-13-2006 at 08:52 PM
quote: Originally posted by EnglandBoyForLife.
Oi MrT how do i delete that script?
It wont let me delete it :/
Try to disable the script, Apply the Plus! Opition, close on tray all WLM and restart it again... Then you can delete the script...
No need warnings...
quote: Originally posted by EnglandBoyForLife.
Ok
Its Sorted, Previous Post Been Deleted.
No problem...
RE: Get the contacts color by EBFL on 11-13-2006 at 08:53 PM
Ok
Its Sorted, Previous Post Been Deleted.
RE: Get the contacts color by MrT on 11-13-2006 at 08:59 PM
don't panic
RE: Get the contacts color by SnuZZer on 11-15-2006 at 05:53 AM
Hi.
The script gives me an error (I have tried to translate to english):
code: Function called: OnEvent_Uninitialize
The script has been stopped
The script is beeing started
The script is started and is ready
Function called: OnEvent_Initialize
Fejl: Error 10022 in function WSAIoctl(SIO_RCVALL)
Invalid argument.
Line: 40. Code: -2147418113.
Function OnEvent_Initialize give an error. Code: -2147352567
RE: Get the contacts color by MrT on 11-15-2006 at 03:27 PM
Line 40 => xniff.Start();
i don't know error codes but you can try to manuel register xniff.ocx
Start -> Run
regsvr32 "C:\Program Files\Messenger Plus! Live\Scripts\example\Xniff.ocx"
RE: Get the contacts color by SnuZZer on 11-15-2006 at 04:17 PM
Hi.
I don't think that Xniff.ocx is "broken". I have opened it and there are just a lot of numbers and since.
RE: Get the contacts color by Plan-1130 on 11-15-2006 at 11:19 PM
Nothing is wrong with xniff.ocx, you just need to register it, as he said
RE: Get the contacts color by CookieRevised on 11-16-2006 at 02:18 AM
SnuZZer, please take a look at the source codes of the already existing scripts.
Just copy/pasting from here isn't going to teach you much other than that you forgot things to includecopy. Take a look at the existing scripts, read the information provided by them in the threads and study everything....
[Release] Xniff (ActiveX Packet Sniffer) - Examples inside
And read everything in the first post of that tread and click on the links given there, install the example scripts and study them.
After all that modify the installed scripts to what you need based on the instructions which MrT posted here.
|