I hate Timers, How to execute a single time?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #190649
    ChiNa
    Administrator

    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
    RedDot()
    Bounce()
    End If
    End If
    Next
    #190655
    Chike
    Member

    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.

    #190654
    ChiNa
    Administrator

    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

    #190653
    pharaon
    Member

    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

    #190652
    ChiNa
    Administrator

    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..

    #190651
    Chike
    Member

    I don’t see anyone join the room in my lines.

    #190650
    pharaon
    Member

    you must enable message me in text as people join the room in the chat room

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.