hello,
i trying to build a program which takes (on mouse click) the text of
any
given input text box on any window and change it.
how do i get the object of the text box and set my text to its value.
thanks...
hello,
i trying to build a program which takes (on mouse click) the text of
any
given input text box on any window and change it.
how do i get the object of the text box and set my text to its value.
thanks...
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Thanks for the fast reply
i got the position with GetCursorPos like you said,
but getting the handler of the whole window was not good for me, so i used AccessibleObjectFromPoint() to get IAccessible.
it was good enough for reading the tex but i couldn't figure out how to set the text,
(set_accValue didn't work). is there a SETTEXT message for Iaccessible?
You'll probably have to enumerate thru the windows to find the window in question. Give the following a try:is there a SETTEXT message for Iaccessible?
Call get_accChildCount
Enumerate the child windows based on what is returned from get_accChildCount
Attempt to get an Idispatch interface for the child
Convert the Idispatch interface to an IAccessible interface
Call WindowFromAccessibleObject to get window handle
Call SendMessage using handle returned from WindowFromAccessibleObject function with WM_SETTEXT to send message to the targeted window.
At this point you could continue recursively to identify other child windows.
I haven't tested the above, It's just my interpretation of the MSDN docs.