What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] loop [HELP PLEASE]

Pages: (2): « First [ 1 ] 2 » Last »
[request] loop [HELP PLEASE]
Author: Message:
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. [request] loop [HELP PLEASE]
anyone know how to make something loop until i write STOP! into the conversation window?

This post was edited on 08-27-2006 at 11:07 PM by skyserpent.
08-27-2006 10:18 PM
Profile E-Mail PM Web Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
RE: [request] loop
code:
var offon = 0;
function OnEvent_Initialize(MessengerStart)
{
while (offon=0)
{
    code to be executed
}
}

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "STOP!") {
offon=1;
}
}


should work, might need a few adjustments (cant test right now).

edit: just so you know this will probably freeze messenger. you'll probably have to look for an alternate route to getting this done (a friend (-dt-) suggested a timer set for 100milliseconds.)

This post was edited on 08-27-2006 at 10:52 PM by Ash_.
[Image: jeansiger5.jpg]
08-27-2006 10:49 PM
Profile PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request] loop
yeh a timer would be good.

anyone fix my code and add me a timer please?

code:
var bomb = 'testing';


function OnEvent_Initialize(MessengerStart)
{
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  if(Message == 'BOMB!')
 
  while (offon = 0)
{

  ChatWnd.SendMessage(bomb);
  }
}
}
}

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin,Message,MessageKind)
{
if (Message == "STOP!") {
offon=1;
}
}

This post was edited on 08-27-2006 at 11:07 PM by skyserpent.
08-27-2006 11:06 PM
Profile E-Mail PM Web Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [request] loop [HELP PLEASE]
code:
var Wnd = null;
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    if(Message == 'BOMB!') {
        Wnd = ChatWnd;
        MsgPlus.AddTimer("Bomb",500);
        return "";
    }
    if(Message == 'STOP!') {
        Wnd = null;
        MsgPlus.CancelTimer("Bomb");
        return "";
    }
}

function OnEvent_Timer(tId) {
    if(Wnd != null) {
        Wnd.SendMessage("Message Bomb");
        MsgPlus.AddTimer("Bomb",500);
    }
}

That should work, but it's pointless. MSN will stop sending messages after the 15th. And why would you want to spam somebody? It's quite annoying.

This post was edited on 08-27-2006 at 11:30 PM by Silentdragon.
08-27-2006 11:19 PM
Profile E-Mail PM Web Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request] loop [HELP PLEASE]
why will it stop sending after the 15th?

thanks matey... it doesn't work though :(

it sends one but thats it

debug:
code:
Script is starting
Script is now loaded and ready
Function called: OnEvent_ChatWndSendMessage
Function called: OnEvent_Timer
Function called: OnEvent_ChatWndSendMessage

This post was edited on 08-27-2006 at 11:24 PM by skyserpent.
08-27-2006 11:22 PM
Profile E-Mail PM Web Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [request] loop [HELP PLEASE]
I missed one thing, updated my post. It stops at the 15th because its the flood protection.
08-27-2006 11:31 PM
Profile E-Mail PM Web Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request] loop [HELP PLEASE]
cheers! now for more please lol

how could i get it so that its exactly the same but it creates two timers with two different texts and stops both when STOP! is sent

i am very aprectiative for this

This post was edited on 08-27-2006 at 11:43 PM by skyserpent.
08-27-2006 11:42 PM
Profile E-Mail PM Web Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [request] loop [HELP PLEASE]
code:
var Wnd = null;
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    if(Message == 'BOMB!') {
        Wnd = ChatWnd;
        MsgPlus.AddTimer("Bomb",500);
        MsgPlus.AddTimer("Bomb2",500);
        return "";
    }
    if(Message == 'STOP!') {
        Wnd = null;
        MsgPlus.CancelTimer("Bomb");
        MsgPlus.CancelTimer("Bomb2");
        return "";
    }
}
function OnEvent_Timer(tId) {
    if(Wnd != null) {
        if(tId == "Bomb") {
            Wnd.SendMessage("Message Bomb");
            MsgPlus.AddTimer("Bomb",500);
        } else if(tId == "Bomb2") {
            Wnd.SendMessage("Message Bomb2");
            MsgPlus.AddTimer("Bomb2",500);
        }
    }
}
08-28-2006 12:29 AM
Profile E-Mail PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [request] loop [HELP PLEASE]
Note that it'll stop at 15 messages, so this will be pretty pointless really. It won't work well. :/
08-28-2006 12:30 AM
Profile PM Find Quote Report
skyserpent
Junior Member
**

Bacon

Posts: 96
32 / Male / –
Joined: Aug 2006
O.P. RE: [request] loop [HELP PLEASE]
when it stops if you type something else it carrys on going... thats why i thought about putting two because i thought it would keep going, with it saying something else. anyone got any ideas of how to get by the restriction?
08-28-2006 12:44 AM
Profile E-Mail PM Web 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