[Request] Alert on specific message |
Author: |
Message: |
glargle
New Member
Posts: 11
Joined: Jul 2007
|
O.P. RE: [Request] Alert on specific message
Thanks, but I'm still not getting any sound. I'm using:
code: MsgPlus.PlaySound("C:\\Program Files\\Messenger Plus! Live\\Scripts\\Wakealert\\wakeupfaggot.mp3");
|
|
07-18-2007 04:58 AM |
|
|
davidpolitis
Full Member
Posts: 371 Reputation: 16
Joined: Aug 2006
|
RE: RE: [Request] Alert on specific message
quote: Originally posted by glargle
Thanks, but I'm still not getting any sound. I'm using:
code: MsgPlus.PlaySound("C:\\Program Files\\Messenger Plus! Live\\Scripts\\Wakealert\\wakeupfaggot.mp3");
Try the following
code: MsgPlus.PlaySound("\C:\\Program Files\\Messenger Plus! Live\\Scripts\\Wakealert\\wakeupfaggot.mp3");
You could also use a toast to play the sound and say what word from the array the received message contained if you really want to
This post was edited on 07-18-2007 at 07:22 AM by davidpolitis.
|
|
07-18-2007 06:39 AM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [Request] Alert on specific message
Just to explain... a relative path is relative to the scripts folder so it would be easier to copy the sound file there and just use the filename in the script.
An absoloubte path is from the drive letter, but to show the script that it's an absoloubte path, you need to put a single slash at the beginning of the path.
<Eljay> "Problems encountered: shit blew up"
|
|
07-18-2007 12:25 PM |
|
|
davidpolitis
Full Member
Posts: 371 Reputation: 16
Joined: Aug 2006
|
RE: RE: [Request] Alert on specific message
quote: Originally posted by SpunkyLoveMuff
Just to explain... a relative path is relative to the scripts folder so it would be easier to copy the sound file there and just use the filename in the script.
An absoloubte path is from the drive letter, but to show the script that it's an absoloubte path, you need to put a single slash at the beginning of the path.
sorry, knew you could do that with toasts, but not with this, not really good at JS.
|
|
07-18-2007 01:36 PM |
|
|
glargle
New Member
Posts: 11
Joined: Jul 2007
|
O.P. RE: [Request] Alert on specific message
I'm messing up something because it's still not working. I've tried the relative and absoloute things but still fails :\
Here's the whole thing, I must be doing something wrong.
code: var word = new Array(
"!wake",
"!wakeup",
"!wakewake"
);
var re = RegExp("\b"+word.join("\b|\b")+"\b","i");
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
if(Origin != Messenger.MyName && re.test(Message)){
MsgPlus.PlaySound("\C:\\Program Files\\Messenger Plus! Live\\Scripts\\Wakealert\\wakeupfaggot.mp3");
}
}
|
|
07-18-2007 02:50 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [Request] Alert on specific message
use code: MsgPlus.ScriptFilesPath+"\\wakeupfaggot.mp3"
and place the mp3 in the script folder (Wakealert folder)
<Eljay> "Problems encountered: shit blew up"
|
|
07-18-2007 03:47 PM |
|
|
glargle
New Member
Posts: 11
Joined: Jul 2007
|
O.P. RE: [Request] Alert on specific message
Still nothing. Does it work for you guys or is it a problem on my end?
|
|
07-18-2007 04:00 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [Request] Alert on specific message
try seeing what the function returns... code: Debug.Trace(MsgPlus.PlaySound("wakeupfaggot.mp3));
If it's false, then it won't play... I just tried it a few times with a test script and it works when it wants tbh
<Eljay> "Problems encountered: shit blew up"
|
|
07-18-2007 04:20 PM |
|
|
glargle
New Member
Posts: 11
Joined: Jul 2007
|
O.P. RE: [Request] Alert on specific message
When I change that, the debugger says
code: Error: Expected ')' (code: -2146827282)
File: Wakealert.js. Line: 11.
I don't know what I'm messing up.
|
|
07-18-2007 04:28 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [Request] Alert on specific message
my mistake...
forgot the end quote around the file name
<Eljay> "Problems encountered: shit blew up"
|
|
07-18-2007 05:14 PM |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|