I wrote this in 2010 before I knew Python, don't judge.
This script will, in Starcraft 2, automatically inject larva in all your hatcheries every 30s incredibly quickly (you may get an APM spike over 1000).
The script uses pyhook, a library for low-level keyboard and mouse hooks in Windows. Pyhook has it's own system requirements - I think it also requires Python 2.7 or earlier.
Immediately after initiating the auto-injecting and every 30s thereafter, your computer will beep. One second later, the script will press:
- 'ctrl+9' (to save your currently selected units)
- '6' (to select the queens)
- for every hatchery you've indicated, it will press 'v' and click on that hatchery on the minimap
- '9' (to reselect the units you had selected)
Before entering a command, press the '\' key. There are four commands:
- 'o' indicate hatchery - after pressing \o, click on your minimap where the hatchery is located. The location is now stored for future use in the script.
- 'q' initiate auto-injecting the script will begin auto-injecting every 30s. Before this command is issued, you must have indicated at least one hatchery location.
- 'r' reset script this will delete all hatchery locations in memory and stop auto-injecting every 30s. You may re-assign the hatchery locations and start the auto-injections again.
- 'p' quit
Notes:I recommend that you refrain from moving your mouse or pressing buttons during the 0.1s when the auto-injecting is happening. If you use the grid layout (not default), edit the script to change the 'v' to 'x' where it's marked. Assign your queens to hotkey 6. The script will use hotkey 9 to reselect the units you had selected when the script started. While the script is running, you may use four commands: