Shoutbox

[Request] Script that won't let me write "short-tempered" messages :) - 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: [Request] Script that won't let me write "short-tempered" messages :) (/showthread.php?tid=86423)

[Request] Script that won't let me write "short-tempered" messages :) by Bogy on 10-05-2008 at 09:18 PM

Greetings!

I often feel that some of my reactions/answers while talking on MSN with someone are too offensive/peppery/not thoroughly thought.

When making these mistakes I feel that if somehow I could make my MSN client to disable answering to a received message for some time my messages would be much more reasonable.

A simple script would be really useful for this. :)

This script would allow the user to set a time period in seconds and so answering in a msn chat window would not be possible until that time expired.


RE: [Request] Script that won't let me write "short-tempered" messages :) by roflmao456 on 10-05-2008 at 11:47 PM

this should work :P (don't have the time to test)

code:
var delay = 2500; // in milliseconds. 1000 = 1 second

var delayedchats = new Array();
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
return delayedchats[ChatWnd.handle] ? "" : Message;
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if(Origin !== Messenger.MyName){
delayedchats[ChatWnd.handle] = ChatWnd;
MsgPlus.AddTimer(ChatWnd.handle, delay);
}
}
function OnEvent_Timer(TimerId){
delete delayedchats[TimerId];
}

RE: [Request] Script that won't let me write "short-tempered" messages :) by Bogy on 10-06-2008 at 09:08 AM

First of all thank you for your time and effort!

I have never worked with scripts before in MSN and Im sadly not that programmer type, but I tried this:

In Messenger Plus I created a new script.
Its starting code looks like this:
function OnEvent_Initialize(MessengerStart)
{
}
<-----I Put your code here and saved the script.
function OnEvent_Uninitialize(MessengerExit)
{
}


After restarting the MSN and trying to test is in a conversation it did not do anything. I was still be able to answer as fast as I wanted even if I set var delay = 10000.

What could be the problem?


RE: [Request] Script that won't let me write "short-tempered" messages :) by roflmao456 on 10-06-2008 at 12:05 PM

quote:
Originally posted by Bogy
After restarting the MSN and trying to test is in a conversation it did not do anything. I was still be able to answer as fast as I wanted even if I set var delay = 10000.

What could be the problem?

i just tested it and it works just fine after you receive a message as you described :P
if you want you could post a debug output here

if you mean to send/receive all, replace this line of code
code:
if(Origin !== Messenger.MyName){
with
code:
if(true){
or even just you sending it, change it to
code:
if(Origin === Messenger.MyName){