- This topic has 6 replies, 3 voices, and was last updated 19 years ago by Departure.
-
AuthorPosts
-
August 1, 2005 at 5:52 am #189399AhFoxMember
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 IfNOTE: 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 …
August 1, 2005 at 12:58 pm #189405DepartureMemberhmm 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?
August 1, 2005 at 2:23 pm #189404AhFoxMemberThe 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
August 1, 2005 at 3:15 pm #189403DepartureMemberhmm 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
August 1, 2005 at 3:21 pm #189402DepartureMemberohh 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
August 1, 2005 at 5:06 pm #189401AhFoxMemberAs 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 …
August 1, 2005 at 7:41 pm #189400mightythorMemberIf I understood the question and
if I understand what this function is supposed to do
then I think this link answers your question:Andrew 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.