Can I send keystrokes / mouse events when Windows is locked?
Not exactly - the machine has to be unlocked before sending keystrokes and mouse events will have any effect because while the machine is locked only the Logon console will get the input and Windows is in "tunnel vision" and can't "see" any other Windows. See Also.
However, Macro Scheduler includes a facility called AutoLogon which can automatically log in or unlock Windows if it is logged out or locked, perform the macro, and then log out/lock again.
AutoLogon works under Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 2008/2012 Server.
While AutoLogon has been tested successfully under default installations of Windows successful operation cannot be guaranteed for your system due to the sheer number of possible security configurations. Try it and see.