I hate Timers, How to execute a single time?

Edited again, :/ Forgot the list box code:

Ok guys, a Dumb question, but I really had to get this out of my chest :D.. I start hating TIMERS!

I am trying to create and auto-bouncer from Auto-Pilot “NickList” and Strings “ListBox” project which I updated NICLIST CLASS a few days ago! I am using a command to (bounce and reddot) inside my timer code, so when the user enters the room he will get A REDDOT AND BOUNCED, if his names APPEARS in my LISTBOX ! But it executes it to many times, and honestly I still havnt learned it which is really bugging me.

ListBox1 = Nicknames in Room
ListBox2 = Added Nicknames in (Bounce and Reddot List)

This is the code I am using in my timer, But how can I get this to execute only once! Thank you very much in advance!

And this is the code that I use:
For Each user In ListBox2.Items

If ListBox1.Items.Contains(user) Then
If HighlightNic(user) Then
End If
End If

6 thoughts on “I hate Timers, How to execute a single time?

  1. Why you double psting?

    First of all don’t be a hater.
    The reason a timer “must” be used is that the bounce command must be sent viw PostMessage not SendMessage as SendMessage would block untill the bounce window close.
    So you post the bounce command and wait for the bounce window to open.

    There are other ways to do it, using hooks for example, and take my word for it you would hate hooks much more.

  2. 2nd time EDITED AGAIN:

    Ups, Sry for Double post, didnt notice, i guess instead of clicking on Edit to edit my post I clicked on “Back” arrow on browser, and if i submit it will then create a new topic. My Bad. And no ofcourse am not a hater :D, and yes I know about the hooks and hahaha i def not need that right now.

    Ok so after a few mins again, what I did this time I added my code to a button, and then used the “Button1.Perform.Click()” in my timer, and weird enough thats working the first time, but now after changing the code its not working as it should.. And after 4 hours I am kinda exhausted. I will try in a few hours again after i got some rest!

    Ps, about the SendMessage part, I used the same code you helped me with Auto-Reply to get the window. But I think the bouncer is using another code, I will have to find a way, but maybe not with hooks hahaha, joking well have to learn it the hard way! Thanks Chike

  3. Pharaon, Thanks a lot for your reply! Yeh omg I learned a lot after this post and how to tackle the issues. I am now using other methods such as Threading.. Threading has showen to be a lot helpfull…

    Thanks a lot for the suggestions..

  4. why do you even do it this way by timer..is not good way…you have timer to get last text line in room for sure so just make function to call if the last line contain some one join the room and extract that nick from the last line to do whatever you want with

Leave a Reply

You must Register or Login to comment on I hate Timers, How to execute a single time?