im trying to write a small program than can do some simple tasks for me on the computer. I want the program to be able to press keys in another program without the program being active.
ive written some code to make it press the keys on the keyboard i want, but i dont know how to make it run for the specific program. If i have the specific program running, it presses the keys just fine, but as soon as i tab out of the program, and it starts running in the background instead, it obviously no longer presses the keys in the program, but now in whatever i tabbed into. Is there a way of sending my code to a specific window?
heres my code for the keyboard simulate key pressing