Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
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
 
Old March 24th, 2004, 11:08 AM
Authorized User
 
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bsausser
Default 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
 
Old March 24th, 2004, 12:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

In vb.net or c#.net? Web or windows based?

 
Old March 24th, 2004, 02:48 PM
Authorized User
 
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bsausser
Default

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
 
Old March 27th, 2004, 05:42 PM
Authorized User
 
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bsausser
Default

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
 
Old March 28th, 2004, 06:35 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old March 28th, 2004, 06:42 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialog Box problem r_taduri ASP.NET 2.0 Professional 0 October 29th, 2006 09:33 AM
Bypass a Dialog Box SerranoG Access VBA 3 December 22nd, 2004 05:00 PM
insert dialog box in a dialog box BurhanKhan Visual C++ 7 June 1st, 2004 07:53 PM
Reports Dialog Box Ben Horne Access 4 April 21st, 2004 08:40 PM
Custom Dialog Box snakedog Access 1 March 12th, 2004 09:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.