|
-
Sep 13th, 2005, 09:29 PM
#1
Thread Starter
New Member
Accessing other programs
I am trying to write a program that will automatically enter text into a textbox and then click on a button. The problem is that both the textbox and the button are on a separate form in an unrelated program, which will be running at the same time as my program. I do not have access to the second program's code, so I cannot integrate it into my project or solution.
Is there any way I can do this?
Thank you, Robby
Edit: The second program is made so that pressing the Enter key while focused on the textbox is equivalent to clicking on the button. I don't know whether or not this is useful information.
Last edited by gorcq; Sep 13th, 2005 at 10:26 PM.
-
Sep 14th, 2005, 12:53 AM
#2
Addicted Member
Re: Accessing other programs
 Originally Posted by gorcq
I am trying to write a program that will automatically enter text into a textbox and then click on a button. The problem is that both the textbox and the button are on a separate form in an unrelated program, which will be running at the same time as my program. I do not have access to the second program's code, so I cannot integrate it into my project or solution.
Is there any way I can do this?
Thank you, Robby
Edit: The second program is made so that pressing the Enter key while focused on the textbox is equivalent to clicking on the button. I don't know whether or not this is useful information.
SendKeys can send keystrokes to an app. (Note, you can make Macro software to monitor the mouse strokes and possitions then replay, I made a RuneScape in the old days of Runescape in VB6.) I assume you could still do the same in .NET
Scott
**********
Visit my web page at www.hyphenex.ugtech.net
-
Sep 14th, 2005, 01:25 AM
#3
Thread Starter
New Member
Re: Accessing other programs
Thank you. That is exactly what I was looking for. However, I cannot seem to make it select the right textbox on the other form. Is there any way to do that?
Robby
Last edited by gorcq; Sep 14th, 2005 at 03:30 PM.
-
Sep 14th, 2005, 09:06 AM
#4
Re: Accessing other programs
You might have more luck posting this in the API section. There are API calls you can use to send text to a textbox using SendMessage API's. Theres also ways of enumerating the windows using EnumWins, FindWindowEX, etc. in order to find the control you need to send to.
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
|