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

Pages: (2): « First [ 1 ] 2 » Last »
[Request] Adding a sound for recieved message
Author: Message:
ArGoS
New Member
*


Posts: 5
Joined: Jul 2006
O.P. [Request] Adding a sound for recieved message
Hi there, I would like WLM to execute a sound when a new message is recieved even if the chat window is maximized. Also another sound notification after I press the enter key while sending a message.

I write these lines of code but it does not work:

code:
function OnEvent_ChatWndReceiveMessage(  )
{
    Interop.Call( "kernel32.dll", "Beep", 1000, 1000 );
}


I also would like to change the appearance of the text before the incoming message. I would prefer an IRC style format like [ time ] <username>:
for example:
[ 12:32 ] ArGoS: hi dude

Can please someone help me?
Thanks in advance.
07-20-2006 08:28 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [Request] Adding a sound for recieved message
you have to put the arguments in OnEvent_ChatWndReceiveMessage

OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)

note that the beep is a second long and pretty much hangs msn until it's done beeping

This post was edited on 07-20-2006 at 09:15 PM by AberNStein.
[Image: gybouserbar6hc.gif]
07-20-2006 09:12 PM
Profile PM Find Quote Report
ArGoS
New Member
*


Posts: 5
Joined: Jul 2006
O.P. RE: [Request] Adding a sound for recieved message
Thank you for replying.
07-20-2006 09:14 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [Request] Adding a sound for recieved message
no prob.
as for the square brackets around the time, i'll see what i can do in msgslang.dll

This post was edited on 07-20-2006 at 09:20 PM by AberNStein.
[Image: gybouserbar6hc.gif]
07-20-2006 09:16 PM
Profile PM Find Quote Report
ArGoS
New Member
*


Posts: 5
Joined: Jul 2006
O.P. RE: [Request] Adding a sound for recieved message
Thank you so much for your help.
07-20-2006 09:22 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [Request] Adding a sound for recieved message
code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Uninitialize(MessengerExit)
{
}

function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
if (Origin != Messenger.MyName)
{
var num = 0;
for (var i=0;i<18;i++)
{
num = 75 * i + 700;
Interop.Call( "kernel32.dll", "Beep", num, 35 );
}
}
}


This post was edited on 07-20-2006 at 10:18 PM by AberNStein.
[Image: gybouserbar6hc.gif]
07-20-2006 09:36 PM
Profile PM Find Quote Report
ArGoS
New Member
*


Posts: 5
Joined: Jul 2006
O.P. RE: [Request] Adding a sound for recieved message
I used your code but it doesn't work. :(

As about the text, i would like to have every chat message in one single line with [ Time ] <username>: <message> in order to save space.

EDIT:
I have a question: what does the third parameter of the .Call method is for? Why 18 calls to Interop.Call?

This post was edited on 07-20-2006 at 10:03 PM by ArGoS.
07-20-2006 09:50 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [Request] Adding a sound for recieved message
are you sure it doesn't work? it works here.
the third parameter is the frequency, which increases with each iteration of the for loop. the last parameter is the length, in milliseconds, i assume.

i'll edit the post to show the whole script. try that.

quote:
Originally posted by ArGoS
As about the text, i would like to have every chat message in one single line with [ Time ] <username>: <message> in order to save space.

what do you mean in one single line? if it's a long message or username, it'll wrap.
to get the time before the username, use a-patch. www.a-patch.tk

This post was edited on 07-20-2006 at 10:17 PM by AberNStein.
[Image: gybouserbar6hc.gif]
07-20-2006 10:16 PM
Profile PM Find Quote Report
ArGoS
New Member
*


Posts: 5
Joined: Jul 2006
O.P. RE: [Request] Adding a sound for recieved message
In one single line means something like this:

[ 12:31 ] ArGoS: thanks for your help
[ 12:32 ] AberNstein: you are welcome
[ 12:32 ] ArGoS: have to go now mate
[ 12:32 ] AberNstein: see ya pal, bb
[ 12:33 ] ArGoS: cu later

as you see above every message is in one line only instead of the dafault:

ArGoS writes (12:30):
   thanks for your help

that is in two lines.

As for your code:

I performed a copy & paste of all the code in a new empty Script Editor window (I removed the standard events because are already contained in your code). Saved the script and started it.

I tried chatting with a friend but if he send me a message and my window is maximized I do not hear anything (like the script is doing nothing).

If the code does works in your machine, then I'll try to check where's the mistake I do. Thank you anyway, very much appreciated.

This post was edited on 07-20-2006 at 10:39 PM by ArGoS.
07-20-2006 10:29 PM
Profile E-Mail PM Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
RE: [Request] Adding a sound for recieved message
hey hey hey don't put words in my mouth.
j/k
that's certainly not doable with a script, and i doubt you could even mod wlm to do it.
try miranda or trillian.
[Image: gybouserbar6hc.gif]
07-21-2006 10:03 PM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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