What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Alert on specific message

Pages: (3): « First « 1 2 [ 3 ] Last »
[Request] Alert on specific message
Author: Message:
glargle
New Member
*


Posts: 11
Joined: Jul 2007
O.P. RE: [Request] Alert on specific message
Yeah, it says false.
07-18-2007 05:35 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: RE: [Request] Alert on specific message
quote:
As you can read in the Official Scripting Documentation

Syntax
[boolean] PlaySound(
    [string] SoundFile
    [number,optional] MaxPlayTime
);

Parameters: SoundFile
[string] Path to the sound file to play. The path is relative to the script's directory by default, to override this behavior, prefix the path with "\". Example: "\C:\directory\sound.mp3". If this string is empty, the current sound playing is stopped and the function returns.

+

quote:
Originally posted by roflmao456
btw, for a single backslash ( \ ) you have to put two. so

\\

=

MsgPlus.PlaySound("\\C:\\Program Files\\Messenger Plus! Live\\Scripts\\Wakealert\\wakeupfaggot.mp3");

or if you put the mp3 in the same directory as your script:
MsgPlus.PlaySound("wakeupfaggot.mp3");


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

PS: glargle, make also sure the MP3 is an actual proper MP3. Also, Plus! can play many formats, but it is quite possible that some subformats can't be played.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-18-2007 10:46 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [Request] Alert on specific message
quote:
Originally posted by CookieRevised
PS: glargle, make also sure the MP3 is an actual proper MP3. Also, Plus! can play many formats, but it is quite possible that some subformats can't be played.

I thought about the file format, but wasn't sure. I tried PlaySound with the ScriptFilesPath and it worked occasionally... Does that still have to have the \\ at the start or not?
<Eljay> "Problems encountered: shit blew up" :zippy:
07-19-2007 12:27 AM
Profile PM Find Quote Report
glargle
New Member
*


Posts: 11
Joined: Jul 2007
O.P. RE: [Request] Alert on specific message
OK I'm confused now, it turns out it was the .mp3 that wouldn't play, because I tried using a .wav and it plays fine.

The problem is, the .wav plays when I put it in a script to just play that file, but when I put it in the Wakealert script, it won't play.

Edit: I got it to work with roflmao456's script. Thanks alot everyone!

This post was edited on 07-19-2007 at 01:36 AM by glargle.
07-19-2007 01:14 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Request] Alert on specific message
quote:
Originally posted by SpunkyLoveMuff
I thought about the file format, but wasn't sure. I tried PlaySound with the ScriptFilesPath and it worked occasionally... Does that still have to have the \\ at the start or not?
If you want the path to be absolute then yes, you need the have the \ character at the start of the path string. And to have a \ character in JScript you need to enter either the string "\\" or enter the character as a ascii code like "\x5C".
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-19-2007 09:47 AM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [Request] Alert on specific message
quote:
Originally posted by CookieRevised
quote:
Originally posted by SpunkyLoveMuff
I thought about the file format, but wasn't sure. I tried PlaySound with the ScriptFilesPath and it worked occasionally... Does that still have to have the \\ at the start or not?
If you want the path to be absolute then yes, you need the have the \ character at the start of the path string. And to have a \ character in JScript you need to enter either the string "\\" or enter the character as a ascii code like "\x5C".
And this is why I think Patchou needs to amend the documentation to make it easier for new people to understand for this stuff to do with files.  He should at least put it in the remarks section, isn't that why it is there after all?
[Image: markee.png]
07-19-2007 01:08 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Request] Alert on specific message
In one way I totally agree.

Although knowing that the \ character is an 'escape' character used for entering literal characters or characters by their ascii code, etc is actually basic knowledge when you work with JScript (and many many other languages for that matter).

An example (where the double backslash is used) wouldn't hurt though.
But I think a "more in depth explaination" of the use of characters and stuff and especially the backslash in JScript is not on its place there; that belongs in the 'string' section in the Jscript documentation...



EDIT: Spelling mistake fixed. Thx markee, keep them coming ;)

This post was edited on 07-21-2007 at 09:31 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-19-2007 03:20 PM
Profile PM Find Quote Report
Pages: (3): « First « 1 2 [ 3 ] Last »
« 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