Retriving fields value of UI application
-
Hi, I have an GUI based windows application which has text box, edit box fields whose values gets updated from time to time. I Need to get the field values of this GUI application using another application and store them in a file on a periodic basis. BTW,I don't have the source code of the GUI application. Can it be done using windows messaging or suggest me a way how to go about doing this.. Thanks,
-
Hi, I have an GUI based windows application which has text box, edit box fields whose values gets updated from time to time. I Need to get the field values of this GUI application using another application and store them in a file on a periodic basis. BTW,I don't have the source code of the GUI application. Can it be done using windows messaging or suggest me a way how to go about doing this.. Thanks,
TssPrasad wrote:
Can it be done using windows messaging or suggest me a way how to go about doing this..
use FindWindow to Find the Window Handle of the Text Box and using WM_GETTEXT method retrieve the length... Before sending the WM_GETTEXT, send WM_GETTEXTLENGTH to retrieve the length of the Text
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
TssPrasad wrote:
Can it be done using windows messaging or suggest me a way how to go about doing this..
use FindWindow to Find the Window Handle of the Text Box and using WM_GETTEXT method retrieve the length... Before sending the WM_GETTEXT, send WM_GETTEXTLENGTH to retrieve the length of the Text
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.
-
Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.
TssPrasad wrote:
what can i do to know the class name & window name...
Window Name is name of the application Window.. from there you have to Enumerate the Child Window using FindWindowEx function (sorry my mistake here). i believe your seond problem solved using Handle return by FindWindowEx!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
Thanks alok for the idea.. >>The FindWindow function retrieves a handle to the top-level window whose >>class name and window name match the specified strings what can i do to know the class name & window name... >>WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller. if a window has many text edit box, will it copy all the text corresponding to the windows fields?? can you please clarify.
TssPrasad wrote:
what can i do to know the class name & window name...
Use Spy++.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb