Automatic Key Presser


So im trying to make a code that presses a key at a certain time, even if im in another program. Is this possible, and if so with what extensions and code? thanks!


Would it work to have a script that activates a command at a certain time, or do you need to make a keypress happen?