Suffering from RSI I am writing a project that automates some keystrokes. Yes, I am aware there are many apps out there to do this for me, but like many coders I am always interested in doing it myself.
As part of this project I need a module that will allow my app to send keystrokes to another Windows app without shifting focus from what I am doing. For instance...
My application needs to send a series of predetermined keystrokes to 3rdPartyApp.exe. I want my app to be able to send those keystrokes correctly. BUT, I don't want whatever I'm doing (websurfing, whatever) to be interrupted by Windows focus going to 3rdPartyApp.exe.
Using SendKeys I can do this in my current code, but SendKeys requires that the target app (in this case [login to view URL]) receive focus prior to the keys being sent. THAT is the limitation I am trying to overcome.
I am open to discussions on how this module would be implemented but I initially see it as receiving two parameters: The name of the target app, and the keystroke(s) to send. Details are open to discussion between me the coder receiving this contract.
The final requirement is that this needs to work with whatever app I happen to be running, Firefox, Photoshop, IM, whatever. Essentially it has to work without any modifications of the target application.
Thank you
## Deliverables
The deliverable must be a fully functional C# module that can be cut and pasted into my application and run w/o causing anything else in the application to break.
See above for the module requirements