Word Capture
-
I want to capture Text Under Mouse pointer. I have used
IAccessible::get_accName
and
IAccessible::get_accValue
to find out Text Under Mouse using
AccessibleObjectFromPoint
. But I want just a word that is under mouse pointer. I am looking for any help. Thank you Regards, Swapnil Shah
-
I want to capture Text Under Mouse pointer. I have used
IAccessible::get_accName
and
IAccessible::get_accValue
to find out Text Under Mouse using
AccessibleObjectFromPoint
. But I want just a word that is under mouse pointer. I am looking for any help. Thank you Regards, Swapnil Shah
See How to retrieve text under the mouse pointer[^]
It is a crappy thing, but it's life -^ Carlo Pallini
-
See How to retrieve text under the mouse pointer[^]
It is a crappy thing, but it's life -^ Carlo Pallini
I have already used IAccessible. This technique gives you a whole sentence. I am looking for word capture. I want to grab a word under mouse from any application. plz give me some suggestions. Regards, Swapnil Shah
-
I have already used IAccessible. This technique gives you a whole sentence. I am looking for word capture. I want to grab a word under mouse from any application. plz give me some suggestions. Regards, Swapnil Shah
Hi Swapnil, I am not able to instantly think of a technique to get this done. Probably you can use an OCR and get the word under the mouse cursor, and then search for it in the sentence that IAccessible returned. If it's present in the sentence, you could be double sure. Ya, I know it's dumb. But why not check if it goes through well? :-D I'll think on this line and write you another reply if I get a better idea.
It is a crappy thing, but it's life -^ Carlo Pallini
-
Hi Swapnil, I am not able to instantly think of a technique to get this done. Probably you can use an OCR and get the word under the mouse cursor, and then search for it in the sentence that IAccessible returned. If it's present in the sentence, you could be double sure. Ya, I know it's dumb. But why not check if it goes through well? :-D I'll think on this line and write you another reply if I get a better idea.
It is a crappy thing, but it's life -^ Carlo Pallini
Hi Thanks for reply. I think i should try OCR. I have never used it but i have read that its highly unreliable. plz reply me if u get any better idea. Regards, Swapnil Shah
-
Hi Thanks for reply. I think i should try OCR. I have never used it but i have read that its highly unreliable. plz reply me if u get any better idea. Regards, Swapnil Shah
Hi, Did you try using an OCR? I thought over your problem statement and I realise that it's even more complex than it sounds to be. Using the previous method I suggested, you could retrieve the entire text under the window. But, if you need the text (a word?) that's just under the mouse cursor, it would be easier if the text is selected. You could then use something like GetActiveWindow() followed a GetFocus(). If the text weren't selected, I can't think of a readily available technique to achieve this. You will have to do some research on it. If you do achieve it, that would make a nice article for CP. :)
It is a crappy thing, but it's life -^ Carlo Pallini
-
Hi, Did you try using an OCR? I thought over your problem statement and I realise that it's even more complex than it sounds to be. Using the previous method I suggested, you could retrieve the entire text under the window. But, if you need the text (a word?) that's just under the mouse cursor, it would be easier if the text is selected. You could then use something like GetActiveWindow() followed a GetFocus(). If the text weren't selected, I can't think of a readily available technique to achieve this. You will have to do some research on it. If you do achieve it, that would make a nice article for CP. :)
It is a crappy thing, but it's life -^ Carlo Pallini
Hi, We have used the same code as given in http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx to capture objects under mouse in timer.But we are facing memory leakage problem. While debuging this code we got the point of leakage is in function AccessibleObjectFromPoint. We already using IAccesible::Release function and VariantClear to release memory but still memory leakage is there. Any one know ,how to release memory used when AccessibleObjectFromPoint is called. Please help. Thanx in advance. -Jay
-
Hi, We have used the same code as given in http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx to capture objects under mouse in timer.But we are facing memory leakage problem. While debuging this code we got the point of leakage is in function AccessibleObjectFromPoint. We already using IAccesible::Release function and VariantClear to release memory but still memory leakage is there. Any one know ,how to release memory used when AccessibleObjectFromPoint is called. Please help. Thanx in advance. -Jay
Hi, Use a forum appropriate to the topic to create a new thread. I have honestly not worked on this and so I won't be able to answer you. By creating a new thread, your question will be viewed by many people and some of them may be able to give you valuable inputs. I think you could safely use the COM forum for this query.
It is a crappy thing, but it's life -^ Carlo Pallini