I just ran the script from the Macro Move ALL Windows to Primary Screen in both Script Debugger 7.0.7 (7A72) and Script Editor 2.9 (191) on macOS 10.12.6, and it worked fine for me.
Have you tried running it from the Macro?
If you can't get it working, please post the versions of KM and macOS you are running.