I want to find a way to prevent my program (and a third party program being controlled by my program) from receiving any REAL user input.
We have purchased a third party program (a CAM program) to interface with our machines. And I have developed a program to use it to automate the use of that CAM program. Because the CAM program doesn't have its API exposed to my program, my program has to send key strokes to simulate the process of using the CAM program. This arrangement works AS LONG AS our user near the computer doesn't accidentally move the mouse or hit the keyboard; if this erroneous user input happens right at certain moment during the course of my program running, my program will lose track of where it is and cannot go on. I want to find a way to fix this problem.
One way to fix this problem is to lock away the computer in a computer room. But this won't work because the user needs to use the CAM program to do their work (when my program is not running).
I have implemented a locking mechanism to prevent my program from being launched when the user is using the CAM program. But this doesn't prevent someone from accidentally moving the mouse or hitting a key when my program is running (and the user is not using the CAM program).
Another possible solution is to purchase two licenses of the CAM program, and assign the first license to a computer that will be locked away to run my program, and assign the second license for the user. But this costs quite a lot of money every year. And most of the time, that extra computer is just sitting there doing nothing.
I am wondering if there is a way for my program and the CAM program to run in a restricted environment in the same computer where they won't get any REAL user input, and all the user inputs that the CAM program will receive are fake ones that my program feeds to the CAM program.
By the way, the programs are running in Windows 10 environment. My program is a Windows "console" program. The CAM program looks like a typical Windows GUI program.
Please let me know what you think. Thanks.
Jay C