Applescript: automated key press of spacebar/left click at defined intervals
Pretty easy!

To simulate a space bar click use tell application "System Events" to keystroke [key]. Clicking is a bit more difficult. If you want to click at a given point you can use tell application [process] to click at {x-cord,y-cord}. However, if you want to have it just click at whatever point it's at, you'll probably have to use a third party shell application like Cliclick.

Now combine that with the delay [seconds] command and you're good!