 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 24th, 2004, 11:08 AM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A little direction on other program's dialog box
I need a starting point.
There is this other proprietary program I have to use that sends me a dialog box with a "yes" and "no" and a "cancel" button.
I want to build a script or a small program to detect that box and automatically send a keystroke "y" or a click (on yes) each time it appears. It is the same dialog box, with the same question, confirming the same task.
Ideas?
Brian
Brian Sausser, MCP
(858) 229-6129
__________________
Brian Sausser, MCP
(858) 229-6129
|
|

March 24th, 2004, 12:42 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
In vb.net or c#.net? Web or windows based?
|
|

March 24th, 2004, 02:48 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The proprietary program is windows based; I need direction, so which ever would be easier, but I have been pushing myself to become more proficient in C#.
I use Visual Studio.NET for my developement tool.
Are your questions suggesting that it is possible to detect the dialog box and send a keystroke to it??
Brian
Brian Sausser, MCP
(858) 229-6129
|
|

March 27th, 2004, 05:42 PM
|
|
Authorized User
|
|
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Should I give up? I could swear that I saw it done before, but never investigated it until I needed it, which is right now.
Research ideas, a place to start my education for this particular problem?
Brian
Brian Sausser, MCP
(858) 229-6129
|
|

March 28th, 2004, 06:35 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No, I don't think you should give up. Instead, look into the SendKeys class.
This class is designed to send keys to (other) programs. The help topic also suggests ways to find the other application, using FindWindow and SetForegroundWindow.
I have no experience with these latter two methods, so I can't be of much help. However, searching Google for these two methods will provide a lot of useful information.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 28th, 2004, 06:42 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Oh, and one more thing. If you're not really looking for a programming solution, but rather just have the problem fixed, there are ready-made applications that can do this, for example: http://download.com.com/3000-2094-54...l?tag=lst-0-11
Searching www.download.com for "automatically click button" brings up quite some results.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |