- Set the NumLock of keyboard to be
alwayson when the script runs;
- Restore a maximized window before moving it to the next monitor, and then maximize it again.
The first change fixes the problem that the NumLock is set off when I remote connect to the box from the laptop at home. The second change makes the script work for moving a maximized window from a high resolution monitor to a low resolution one. The original script has been updated to fix the problem mentioned here and other bugs. Please check the latest version.