Skip to content

Window Active Focus

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #189399
    AhFox
    Member

    Is there a way to check wether if the Paltalk’s window is ACTIVE …

    For example …

    if (Not isWindowActive(roomName)) Then
    idleMessage()
    Else
    activeMessage()
    End If

    NOTE: NO DO, WHILE LOOP OR TIMER … ’cause I can solve with DO WHILE or TIMER, I can always get the lastline and compare … but wondering is the any API that check if the window is active …

    thank all in advance …

    #189405
    Departure
    Member

    hmm you could use a hooking class, but i personally dont know what API call need to made to make that work, but im sure someone here would know, other wise whats wrong with timers? is there a reason you dont want timers?

    #189404
    AhFox
    Member

    The reason I don’t like timer is that … you have to refresh every milli seconds …

    Grab the last line … and check

    1. Text lengh (that’s easy method I can think of … if the numbers are different we know there is new text) Right ?? Easy and simple
    2. Same message (check for same message … some1 suggest me this … but I think waste a lot of memory … I rather do the text length)
    3. Get the lastline store and compare …

    Every some milli seconds you have to do this … imagine leaving for comp for a whole week … Yuck …

    So if there is a winAPI or VisualBasic command … checking for windowActive … then would be great …

    No source is wasted … if is active then we call getLastLine …. otherwise do notthing … nothing is wasting

    #189403
    Departure
    Member

    hmm how did you come up with that conclusion?? i mean if the window is not active the function can not get the text let alone the last line, so in other words a timmer is used to to check if the window is active and if it is then it can processed with getting the text, so no window = no text, no text = no using up memory, using a timer just to send like a “ping” to see if the window is active or not does’nt take up anymore resources than if you had a API call to see if its active or not

    #189402
    Departure
    Member

    ohh one more thing holding the text of the room and holding the lastline is much faster putting it into a string rather than using a textbox or richtextbox to hold the text.

    and its just accured to me that you mean you want to see if there is a lastline API, because when you say “active” that in my mind is when the paltalk room is open thus a timer is no resource hog for checking if the window is open or not

    #189401
    AhFox
    Member

    As I programmed I used method one …

    I don’t keep track of lastline …

    I’m keeping track of text length …

    Declare as Long

    So that means… if the text length is the same … meaning there is not text adding to it … so the window is not Active …

    Maybe we are missing the point …

    When I said … Window Active …
    I’m not saying that the Window is On Top and Active …

    I’m saying …. if there is more text in the Paltalk’s chatroom window … is there any other method to check if the more texts are added to the chatroom window rather using timer / do / while …

    #189400
    mightythor
    Member

    If I understood the question and
    if I understand what this function is supposed to do
    then I think this link answers your question:

    Andrew 🙂

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