Using SendKeys in a console...

aluminumpork

New member
Joined
Apr 4, 2006
Messages
1
Programming Experience
5-10
First of all, a little background. I am developing a simple console app that connects to a database, checks for documents to be faxed, downloads the documents and then faxes them. Everything is working great, except, the documents I need to fax are HTML, and therefore the FaxServer object pops up a print dialog box. No other documents cause this to happen. This obviously hinders the automation aspect of the program, as you must click OK in order to fax. I've searched and searched, but have found no solution to bypass automatically. I have been told that send keys can simulate the ENTER key, which I've tried, but it reports:

"SendKeys cannot run inside this application because the application is not handling Windows messages. Either change the application to handle messages, or use the SendKeys.SendWait method."

This makes sense, since the app is a console app. But how else can do this? The SendWait method is not a part of Microsoft.VisualBasic.Devices.Keyboard, and switching to a form application is not an option.

Any ideas? Many thanks in advance.
 
Back
Top