Shoutbox

welcome toast - 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: welcome toast (/showthread.php?tid=70874)

welcome toast by cameron.stokes3 on 01-20-2007 at 03:30 PM

there used to be a script that was called something like welcome toast... the basics of the script where... if.email = blaa display a toast on sign in saying welcome... does anyone have a link to this script as i cant find it or can anyone replicate something like this for me?


RE: welcome toast by matty on 01-20-2007 at 04:06 PM

code:
function OnEvent_SigninReady(_email) {
    if (_email === 'johndoe@hotmail.com') {
        MsgPlus.DisplayToast('Welcome:', 'Welcome '+_email);
    }
}

RE: welcome toast by cameron.stokes3 on 01-25-2007 at 06:29 PM

awesome... cheers


RE: welcome toast by plus on 01-25-2007 at 06:36 PM

is there a way for it to be if  any one signs in


RE: welcome toast by Supersonicdarky on 01-25-2007 at 06:37 PM

code:
function OnEvent_SigninReady(_email) {
   MsgPlus.DisplayToast('Welcome:', 'Welcome '+_email);
}


if this is wrong, i phail :tongue:

RE: welcome toast by Jimbo on 01-25-2007 at 06:43 PM

Isn't this the first script that you make? In the scripting docs


RE: welcome toast by plus on 01-25-2007 at 06:47 PM

Yes but the  scripting docs are lost a can find them

I shall redownload :p


RE: welcome toast by cameron.stokes3 on 01-25-2007 at 06:49 PM

code:
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}

function OnEvent_SigninReady(_email) {
if (_email === 'blaa@blaa.com') {
MsgPlus.DisplayToast('Welcome', 'Hello and Welcome to Windows Live Messenger NAME.\n\r\n You have '+online+' contacts online.');
}
}

hi...  i am tryin to make the toast show how many contacts are online and this is what ive come up with... im not very good at this as it doesnt work :S do you know how to make it do what i want?
RE: welcome toast by Supersonicdarky on 01-25-2007 at 06:55 PM

ready script: http://shoutbox.menthix.net/showthread.php?tid=65477&pid=720331

decompile it and see how its done in there if you want to learn


RE: welcome toast by cameron.stokes3 on 01-25-2007 at 07:24 PM

code:
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Welcome!', 'Hello '+sEmail+' You have '+online+' contacts online.', '' , '' ,'', '');
}


ok i have thqat and it all works but... all i see is hello and my email... the rest of it goes off the edge... how do i make it have like word wrapping so it makes it on a new line if it dont fit?
RE: welcome toast by Jimbo on 01-25-2007 at 07:54 PM

quote:
Originally posted by cameron.stokes3
code:
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Welcome!', 'Hello '+sEmail+' You have '+online+' contacts online.', '' , '' ,'', '');
}


ok i have thqat and it all works but... all i see is hello and my email... the rest of it goes off the edge... how do i make it have like word wrapping so it makes it on a new line if it dont fit?
Put \n when you want a new line

RE: welcome toast by cameron.stokes3 on 01-26-2007 at 04:41 PM

wen i put \n just before "You have..." it pushes it all of the toast completely so all i get is welcome and the email


RE: welcome toast by lrac522 on 01-26-2007 at 06:11 PM

How could this script be written to play a customized audio file instead of written text, is it possible? Hi all...(Y)


RE: welcome toast by Supersonicdarky on 01-26-2007 at 07:06 PM

http://shoutbox.menthix.net/showthread.php?tid=70791&pid=779649


RE: welcome toast by lrac522 on 01-26-2007 at 07:10 PM

cheers...(Y)


RE: RE: welcome toast by CookieRevised on 01-26-2007 at 07:59 PM

quote:
Originally posted by plus
Yes but the  scripting docs are lost a can find them

I shall redownload :p

The scripting docs can never be lost though.

Simply select "Scripting Documentation" from the dropdown menu in the script editor. If the scripting documentation isn't available yet, Plus! will automatically redownload it again and will automatically open it. So, no reason to not read the documentation first...

[Image: attachment.php?pid=782596]

After the download, the file MPLScripting.chm (=the scripting documentation) will be located in your Plus! Live installation directory. I suggest also to make a shortcut for it.

;)

------------------------------------------------------------------------------------

quote:
Originally posted by cameron.stokes3
code:
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}

function OnEvent_SigninReady(_email) {
if (_email === 'blaa@blaa.com') {
MsgPlus.DisplayToast('Welcome', 'Hello and Welcome to Windows Live Messenger NAME.\n\r\n You have '+online+' contacts online.');
}
}

hi...  i am tryin to make the toast show how many contacts are online and this is what ive come up with... im not very good at this as it doesnt work :S do you know how to make it do what i want?

The reason that this doesn't work is because you have two of the same functions (OnEvent_SigninReady). You can only have 1 function like that. So add the second one into the first one...

Also note that toasts have a limited space. A full sentence like that will probably not be able to be shown on the small space you got in a toast.

quote:
Originally posted by cameron.stokes3
code:
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){
online++;
} else {
offline++;
}
}
MsgPlus.DisplayToastContact('Welcome!', 'Hello '+sEmail+' You have '+online+' contacts online.', '' , '' ,'', '');
}

ok i have thqat and it all works but... all i see is hello and my email... the rest of it goes off the edge... how do i make it have like word wrapping so it makes it on a new line if it dont fit?

First of all, is there a reason why you use DisplayToastContact here instead of DisplayToast? Both functions are slightly different and if you want auto-wrapping you're best of using DisplayToast.

See scripting documentation for detailed info.

quote:
Originally posted by lrac522
How could this script be written to play a customized audio file instead of written text, is it possible? Hi all...(Y)

Please read the scripting documentation en browse the many available build-in functions (eg: PlaySound).



----------------------------------

I can't emphesize enough how important it is to first read the scripting documentation, and second to search forums.... before asking questions (or even giving advise).

A lot of stuff can be found in it and many questions are answered. Of course, you need to get used to reading the documentation and navigating thru it, the same for the forums. But once you are used to that, you will also have the means to search for answers yourself and in the long run you'll be learning a lot more things and will find solutions much quicker...

;)
RE: welcome toast by plus on 01-26-2007 at 08:14 PM

I didnt know it was there i always thought you had to download it then open it... oh well