What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » what doesn't work?

what doesn't work?
Author: Message:
kris2000
New Member
*


Posts: 2
Joined: Aug 2006
O.P. what doesn't work?
what doesn't work with this script?

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
    if (Message == "test1") {
        WriteString(0, "test");
    }
    if (Message == "test2") {
        MsgPlus.DisplayToast("TEST", ReadString(0));
    }
}
08-27-2006 11:06 AM
Profile PM Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
RE: what doesn't work?
try this.

code:
var x;

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "test1") {
x="test";
}
if (Message == "test2") {
MsgPlus.DisplayToast("TEST", x);
}
}



dont have time to test it right now but that should work. :D

if you really wanna use the WriteString call try this.
code:
var x;

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "test1") {
x.WriteString(0, "test");
}
if (Message == "test2") {
MsgPlus.DisplayToast("TEST", x.ReadString(0));
}
}

[Image: jeansiger5.jpg]
08-27-2006 11:11 AM
Profile PM Find Quote Report
kris2000
New Member
*


Posts: 2
Joined: Aug 2006
O.P. RE: what doesn't work?
Thank you, but it doesn't work

code:
var x;

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "test1") {
x.WriteString(0, "test");
}
if (Message == "test2") {
MsgPlus.DisplayToast("TEST", x.ReadString(0));
}
}

This post was edited on 08-27-2006 at 11:38 AM by kris2000.
08-27-2006 11:31 AM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: what doesn't work?
quote:
Originally posted by kris2000
Thank you, but it doesn't work

code:
var x;

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "test1") {
x.WriteString(0, "test");
}
if (Message == "test2") {
MsgPlus.DisplayToast("TEST", x.ReadString(0));
}
}

This is because this method is not supported by JScript as far as I can see.  I will work if you do it like the first example given by Ash_
[Image: markee.png]
08-27-2006 11:49 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: what doesn't work?
WriteString() and ReadString() are childfunctions of the Databloc object. I think you misunderstood the Plus! Live documentation, since using a DataBloc to save strings is really unneeded. DataBlocs are almost only used to call Windows API functions requiring a memory bloc pointer, like the Color Picker dialog.

The best thing you can do is using Ash_'s function, which is 100% correct. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-27-2006 11:57 AM
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