This is the most common question. However, it shares behaviors with malware (simulating input, hooking into the Windows message loop), which is why some antivirus engines flag it.
Many online multiplayer games (e.g., Minecraft , League of Legends ) have anti-cheat systems that detect "unnatural" clicking patterns, which can lead to account bans.