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

newb @ work...
Author: Message:
Pai
Full Member
***

w00t !

Posts: 203
Reputation: 2
– / Male / –
Joined: Sep 2003
RE: nwwb @ work...
The problem is that you have to include the { } s in an if statement, except if you only want one line of code executed.

For clearing up:
code:
if (condition == "whatever") DoStuff('hello');
code:
if (condition == "whatever") {
   var doWhat = 'hello';
   DoStuff(doWhat);
}

So, your code should be:
code:
function OnSoundEvent_CtrlClicked(Wnd, ControlId)
{
    if (ControlId == "BtnPlay") {
        var Message = "Sound not playing! Learn about MsgPlus.PlaySound! :P";
        MsgPlus.DisplayToast("", Message, "notify.wav");
   }

    if (ControlId == "BtnClose") Wnd.Close(1);

}

To play the sound then the toast is displayed, notify.wav must be on your script's directory.

If you want to play a sound when you want (ie without being when the toast fires up) you use MsgPlus.Playsound('sound.wav'); and sound.wav must be in your script's directory. If you want to play a sound outside the script's directory, use "\" before. Example: "\C:\sound.wav".
07-19-2006 09:15 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
newb @ work... - by ins4ne on 07-19-2006 at 06:56 PM
RE: nwwb @ work... - by absorbation on 07-19-2006 at 07:02 PM
RE: nwwb @ work... - by Stigmata on 07-19-2006 at 07:02 PM
RE: nwwb @ work... - by Pai on 07-19-2006 at 07:02 PM
RE: nwwb @ work... - by ins4ne on 07-19-2006 at 07:06 PM
RE: nwwb @ work... - by ins4ne on 07-19-2006 at 07:33 PM
RE: nwwb @ work... - by Silentdragon on 07-19-2006 at 07:44 PM
RE: nwwb @ work... - by ins4ne on 07-19-2006 at 07:47 PM
RE: nwwb @ work... - by ins4ne on 07-19-2006 at 08:46 PM
RE: nwwb @ work... - by Pai on 07-19-2006 at 09:15 PM
RE: nwwb @ work... - by ins4ne on 07-20-2006 at 03:25 PM
RE: nwwb @ work... - by RaceProUK on 07-20-2006 at 03:38 PM
RE: newb @ work... - by ins4ne on 07-20-2006 at 03:46 PM
RE: newb @ work... - by BstrdSmkr on 07-20-2006 at 05:38 PM
RE: newb @ work... - by ins4ne on 07-20-2006 at 05:40 PM
RE: newb @ work... - by BstrdSmkr on 07-20-2006 at 06:28 PM
RE: newb @ work... - by ins4ne on 07-20-2006 at 06:30 PM
RE: newb @ work... - by Ezra on 07-20-2006 at 06:31 PM
RE: newb @ work... - by ins4ne on 07-20-2006 at 06:35 PM


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