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

Script codes
Author: Message:
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. Script codes
In a script can you have all this because my debugging dosnt work some how?


code:
}function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (sMessage === 'website'){
        MsgPlus.DisplayToast('website', 'website');
    }
    else if (sMessage === 'link'){
        MsgPlus.DisplayToast('link', 'link');
    }
}}function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (sMessage === 'website'){
        MsgPlus.DisplayToast('website', 'website');
    }
    else if (sMessage === 'link'){
        MsgPlus.DisplayToast('link', 'link');
    }
}}function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (sMessage === 'website'){
        MsgPlus.DisplayToast('website', 'website');
    }
    else if (sMessage === 'link'){
        MsgPlus.DisplayToast('link', 'link');
    }
}}function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (sMessage === 'website'){
        MsgPlus.DisplayToast('website', 'website');
    }
    else if (sMessage === 'link'){
        MsgPlus.DisplayToast('link', 'link');
    }
}

and more..........

about the debugging can any one help it dosnt open when i create a new script or edit one

EDIT: The code is wrong but is it was right[u]

This post was edited on 01-14-2007 at 12:39 AM by plus.
01-14-2007 12:36 AM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Script codes
you cant have more than 1 on the same function ;)

and why do you need so many of the 1 function? :S
01-14-2007 12:38 AM
Profile PM Find Quote Report
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. RE: Script codes
no but if the ''website'' was differant for eatch one
01-14-2007 12:40 AM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Script codes
code:
var websites = new Array('web1.com','web2.net');
var links = new Array('link1','link2');

function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
if(sMessage === wesites[0]){
MsgPlus.DisplayToast(websites[0], websites[0]);
}else if(sMessage === websites[1]){
MsgPlus.DisplayToast(websites[1], websites[1]);
}
if(sMessage === links[0]){
MsgPlus.DisplayToast(link[0], link[0]);
}else if(sMessage === links[1]){
MsgPlus.DisplayToast(link[1], link[1]);
}
websites[0] is web1.com ;)

there is better ways of doing it than what i did but it will still work ;)



quote:
Originally posted by .2007
no but if the ''website'' was differant for eatch one

well it still wouldnt work because of having multi-functions ;) as i said you _cant_ have more than 1 of the same

This post was edited on 01-14-2007 at 12:52 AM by NanaFreak.
01-14-2007 12:50 AM
Profile PM Find Quote Report
plus
Banned


Posts: 127
Reputation: -10
Joined: Jan 2007
O.P. RE: Script codes
say i wanted to make a script for when i say a certain word a toast will come up can i copy that code in 50 times but instead of website all the time it would be

qwe
rty
wed
wer
wes
wert
mjn
fbvf
cvfv
dvc
>examples lol

so not just one word a whole list

would that work
01-14-2007 01:35 AM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Script codes
i will code something for you now to do that ;)

code:

code:
var arr = new Array('qwe','rty','wed','wer','wes','wert','mjn','fbvf','cvfv','dvc');

function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    for(i in arr){
        if(arr[i]===sMessage){
            MsgPlus.DisplayToast(sMessage,sMessage);
        }
    }
}


This post was edited on 01-14-2007 at 02:00 AM by NanaFreak.
01-14-2007 01:37 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Script codes
quote:
Originally posted by .2007
no but if the ''website'' was differant for eatch one
Then use a switch statement.
[Image: spartaafk.png]
01-14-2007 01:55 PM
Profile 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