Get the contacts color |
Author: |
Message: |
Plan-1130
Full Member
I keep askin' myself: why?
Posts: 142
73 / / –
Joined: Feb 2005
|
|
11-13-2006 08:46 AM |
|
|
SnuZZer
Full Member
Posts: 114
32 / /
Joined: Jun 2006
|
O.P. RE: Get the contacts color
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."
|
|
11-13-2006 02:01 PM |
|
|
Plan-1130
Full Member
I keep askin' myself: why?
Posts: 142
73 / / –
Joined: Feb 2005
|
RE: Get the contacts color
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;
}
This post was edited on 11-13-2006 at 02:16 PM by Plan-1130.
|
|
11-13-2006 02:10 PM |
|
|
SnuZZer
Full Member
Posts: 114
32 / /
Joined: Jun 2006
|
O.P. RE: Get the contacts color
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;
}
|
|
11-13-2006 03:32 PM |
|
|
MrT
Junior Member
Coding For Fun
Posts: 62
35 / /
Joined: Jul 2006
|
RE: Get the contacts color
SnuZZer,
try this script.
you can understand with this.
Debug Window:
Attachment: example.plsc (272.09 KB)
This file has been downloaded 164 time(s).
This post was edited on 11-13-2006 at 08:32 PM by MrT.
|
|
11-13-2006 08:26 PM |
|
|
MicroWay
Senior Member
Do you want me? Try to get me!
Posts: 571 Reputation: 16
37 / /
Joined: Jul 2006
Status: Away
|
RE: Get the contacts color
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...
This post was edited on 11-13-2006 at 08:57 PM by MicroWay.
|
|
11-13-2006 08:52 PM |
|
|
EBFL
Full Member
;o
Posts: 486 Reputation: 67
31 / /
Joined: Oct 2006
|
RE: Get the contacts color
Ok
Its Sorted, Previous Post Been Deleted.
|
|
11-13-2006 08:53 PM |
|
|
MrT
Junior Member
Coding For Fun
Posts: 62
35 / /
Joined: Jul 2006
|
RE: Get the contacts color
don't panic
|
|
11-13-2006 08:59 PM |
|
|
SnuZZer
Full Member
Posts: 114
32 / /
Joined: Jun 2006
|
O.P. RE: Get the contacts color
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
|
|
11-15-2006 05:53 AM |
|
|
MrT
Junior Member
Coding For Fun
Posts: 62
35 / /
Joined: Jul 2006
|
RE: Get the contacts color
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"
|
|
11-15-2006 03:27 PM |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|