|
-
Dec 7th, 2007, 07:09 AM
#1
Thread Starter
Hyperactive Member
VB2005- Extracting data from other application
Hi,
I am wondering if it is possible to extract values from various controls (such as textboxes, comboboxes) available on an application using API's?
For example App1 is the application which has several controls such textboxes and comboboxes.
Is is possible to write App2 (which runs seperately) that extract data available on the controls of App1?
The purpose is for automated testing...
Any feedback will highly appreciated..
thanks
-
Dec 7th, 2007, 09:17 AM
#2
Re: VB2005- Extracting data from other application
Yes Surya,
SendMessage api is one of the best choices to obtain the value from an external application's controlls (windows).
But to use SendMessage, you must have some knowledge on window handles and how to obtain external application window (Main window, textbox, combobox, command button etc, are all are just windows) handles. if you can obtain the handle of the exteranal control you want to retrive the information, then you almost get it. There are many examples on the forum regarding sendmesage api and window handles. also in my signature. just give a try.
Specially, in this api forum, there are many threads with title like "Retrive information from external application" like. so a search is what you need.
the is another method call DDE, I have never used that.
-
Dec 7th, 2007, 11:40 AM
#3
Re: VB2005- Extracting data from other application
Suriya, i am sorry, i am talking about vb6, and just now i saw that your asking in vb2005 . Sorry.
-
Dec 9th, 2007, 10:13 AM
#4
Thread Starter
Hyperactive Member
Re: VB2005- Extracting data from other application
Thank you Fazi for your response...
I am wondering if anyone is conversant with API's for extracting data from another app..
thanks
-
Dec 9th, 2007, 10:24 AM
#5
Re: VB2005- Extracting data from other application
Also dont forget to search the forum for this Topic
-
Dec 11th, 2007, 12:44 AM
#6
Thread Starter
Hyperactive Member
Re: VB2005- Extracting data from other application
Hi Fazi,
With my limited knowledge in API's, I have not been able to make any progress on the project so far.
I am wondering if you can help me with some sample code using VB6.
thanks
-
Dec 11th, 2007, 09:06 AM
#7
Re: VB2005- Extracting data from other application
Hi surya,
Can you please tell from which application you want to get data and from which control in that application ?
-
Dec 11th, 2007, 06:52 PM
#8
Re: VB2005- Extracting data from other application
Yes you should be able to do this with the API.
You can use these API:
FindWindow
FindWindowEx
SendMessage
PostMessage
With these constant prefixes for combobox, and Edit(text):
CB_
I've got some examples in this thread:ComboBox
EM_
Edit control Messages should be similar.
Last edited by TTn; Dec 12th, 2007 at 12:46 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|