The only way to achieve that, Dayjo, is to do a System-Wide DLL injection, and hook API's most commonly used for such a thing. This is really beyond the scope of GameMaker, yet it is possible using a DLL for injecting, etc.
This can be defeated very, very simply:
1. Check the DLL file's exports, and write up your own DLL and replace it.
2. Create a System-Wide injection before the game does, and hook it's own functions required to do said System-Wide hook,
3. Run the game as an unprivileged user, where System-Wide DLL injections are not possible.
You can defend against 3, by making sure they have privileges, but a WHOLE lot of gamemaker users and players are children, so this idea isn't really plausible. Lets not forget that System-Wide DLL Injection can be very unstable, and can often crash the computer, if done incorrectly.