Applescript: automated key press of spacebar/left click at defined intervals I'm new to apple scripts and was wondering if there is a way the program the computer to press spacebar or left-click at defined times upon running of the script.

For instance I will be able to same I want the system to press space bar then 2 after press it again and 1.4 seconds later press it again and so on.

The program I will have running will be Chrome. Also would it be possible that this script be executed upon the pressing on the first space bar?
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!