What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [ Dalay ] The best for make a delay for Merlin type script

[ Dalay ] The best for make a delay for Merlin type script
Author: Message:
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
50 / Male / –
Joined: Feb 2007
O.P. Grin  [ Dalay ] The best for make a delay for Merlin type script
function OnEvent_ChatWndCreated(ChatWnd){
    Merlin_RunningON(); 
    Merlin.Play("Greet");
    Merlin.Speak("Votre seigneurie!");
    Merlin.Speak("\\Spd=180\\Permettez moi d'interpréter votre discution!");
    Merlin.Speak("\\Spd=180\\Je suis votre fidèle serviteur!");
    Req = Merlin.Speak("\\Spd=180\\Vous venez d'ouvrir votre fenêtre de clavardage à "+TimeD()+"!");
                         // here
    Do {            //don't work
        Wscript.Sleep 100;
    }   
    while Req.Status > 0;           
    MsgPlus.DisplayToast("Clavardage","Bonne séance!");
}

This post was edited on 03-14-2007 at 05:03 AM by xsylvain2.
03-08-2007 05:11 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: I want to create a loop for message toast later
In what way, 'doesn't work'?
[Image: spartaafk.png]
03-08-2007 06:06 PM
Profile PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: I want to create a loop for message toast later
It should be:
code:
// do should be lower case
do {            //don't work
Wscript.Sleep 100;
}
while ( Req.Status > 0 ); // you need braces around the while statement
MsgPlus.DisplayToast("Clavardage","Bonne séance!");

Check the comments.
4 8 15 16 23 42
03-08-2007 06:16 PM
Profile E-Mail PM Find Quote Report
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
50 / Male / –
Joined: Feb 2007
O.P. [ - Here - ]
That is a good method !
[code]
function OnEvent_ChatWndCreated(ChatWnd){
    Merlin_RunningON(); 
    Merlin.Play("Greet");
    Merlin.Speak("Votre seigneurie!|Votre majesté!|Maitre!");
    Merlin.Speak("\\Spd=180\\Permettez moi d'interpréter votre discution!");
    Merlin.Speak("\\Spd=180\\Je suis votre fidèle serviteur!|Je veis faire le perroquet!");
    Merlin.Speak("\\Spd=180\\Vous venez d'ouvrir votre fenêtre de clavardage à "+TimeD()+"!");
    Merlin.Play("Congratulate_2");
    Merlin.Speak("\\emp\\Bonne \\emp\\séance!");
    Merlin.Play("domagic1");
    MsgPlus.AddTimer("ToastA", 20000);
}

function OnEvent_Timer(TimerId){
    if(TimerId == "ToastA") {
        MsgPlus.DisplayToast("Clavardage","Bonne séance!","\\C:\\WINDOWS\\Media\\ding.wav");
    }
    if(TimerId == "ToastB") {
        MsgPlus.DisplayToast("Clavardage","Au revoir!","\\C:\\WINDOWS\\Media\\ding.wav");
    }   
}

function OnEvent_ChatWndDestroyed(ChatWnd){
    if(Messenger.CurrentChats.count <= 1){
        if(Merlin.Visible == false) {
               Merlin.show();
        }
    Merlin.Speak("\\Spd=200\\Seigneur, vous venez de fermer votre fenêtre de clavardage à "+TimeD()+"!");
    Merlin.Speak("À plus tard!");
    Merlin.Play("wave");
    Merlin.Speak("\\spd=200\\Je vais faire le plein de la \\Emp\\MANA!");
    MsgPlus.AddTimer("ToastB", 10000);
    Merlin_RunningOFF();
    }
}

Interop.Call('user32', 'Sleep 100' it Jam the prosses for next indtance.

This post was edited on 03-14-2007 at 05:01 AM by xsylvain2.
03-11-2007 05:55 PM
Profile PM Find Quote Report
« 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