How to avoid black screenshots
Black screenshots happen if there is (technically speaking) no Windows desktop available. This happens if you lock your PC or even if you disconnect from a remote desktop connection (RDP). Then all Windows screenshot function fail. This is a known issue in all versions of Windows and not an iMacros specific issue.
But there is a good workaround:
Keep the Windows desktop active
On a local PC you can simply disable your screensaver. For remote machines we documented a "trick" to keep the desktop active even after you disconnect from the RDP session: How to keep the Windows desktop active
Start a session automatically
If you want to run iMacros unattended you also need to make sure the Windows session is started after a reboot.
Option 1: Use Autologon (recommended)
If your PC or server is in a secure environment (e. g. a data center) there is an easy method to create an interactive session: Enable Autologon. This will start up the session right after your PC is booted up.
Option 2: When autologon is not an option, you can set up a remote interactive session