To use this script, you must press F3 in-game.
At this point, the script will start executing and pressing the 0-9 buttons at 150ms interval. I assumed that 15ms per key press was enough. I use this script to use groups of units that are assigned to me under the keys 0-9. When I'm not doing anything, I just hit F3 and APM goes up. I recommend you to try and experiment. :)
GL & HF