What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » nick changer on timer

Pages: (2): « First « 1 [ 2 ] Last »
nick changer on timer
Author: Message:
basambora
New Member
*


Posts: 1
Joined: Sep 2005
RE: nick changer on timer
I'm not sure, but mayber you should create a timer and an eventhandler for that so that it triggers the event each timer after a certain amount of time (that's how it works in C#)
09-29-2005 04:20 AM
Profile E-Mail PM Find Quote Report
doremi
New Member
*


Posts: 7
Joined: Feb 2005
RE: nick changer on timer
hi,

I've been modified the code,
I use Messenger Plus! 's sample, and do this :

code:

  else if(stricmp(sCommand,"/xtest") == 0)
  {             
    HANDLE h;
    DWORD tid;
    char name[128];
    h=CreateThread(0,0,(LPTHREAD_START_ROUTINE)countTime,(VOID*)name,0,&tid);
   
    return TRUE;
   }

void countTime(char *szTime)
{
  SYSTEMTIME st;
  GetLocalTime(&st);
  wsprintf(szTime,"%02d:%02d:%02d",st.wHour,st.wMinute,st.wSecond);
  SetNewName(szTime);
  Sleep(1000);
}



But it doesn't work well, when I type /xtest,  my MSN will CRASH!

Help me!  Thanks!!

09-30-2005 09:53 AM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: nick changer on timer
I've made the plugin in C# and it's working properly, just got some problems installing it at windows 98 machines...
09-30-2005 01:36 PM
Profile E-Mail PM Find Quote Report
doremi
New Member
*


Posts: 7
Joined: Feb 2005
RE: nick changer on timer
hi, J-Thread,

Could you share your source code for me?
Please! Please! Please! Please! Please!
Thanks! Thanks! Thanks! Thanks!
10-01-2005 12:55 AM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: nick changer on timer
Euhm...nope... But I'll give you a few parts of it.

code:
public bool Initialize(long nVersion, string sUserEmail, MessengerAPI.MessengerClass oMessenger)
{
    Timer tmr = new Timer();
    tmr.Interval = 1000 * 10; // 10 seconds
    tmr.Tick += new EventHandler(Timer_tick);
    tmr.Start();
}

private void Timer_tick(object sender, EventArgs e)
{
    if(names.Count > 0)
    {
        next++;
        if(next >= namen.Count)
        {
            next = 0;
        }
       SetNewName(names[next].ToString());
    }
}

Where names is an arraylist containing the names. Off course there is an option to turn it on and off, but this is the main part.
10-01-2005 08:10 AM
Profile E-Mail 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