For some unknown reason Apple chose to change how they report the screen properties, which caused this error.
I just updated the Macro with a fix.
It runs fine with Keyboard Maestro 9.2 on macOS 10.14.6 (Mojave).
Since the macro is really just a wrapper for an AppleScript, it may not help you unless you speak AppleScript. When I get some time I'll take a look at allowing the user to specify which screen to move the windows to.
Here's a script to get the coordinates of a specified screen. Maybe you can combine this with the script in the Macro to get what you want.
AppleScript to Get Screen Coordinates
property ptyScriptName : "Get Screen Coordinates"
property ptyScriptVer : "1.0"
property ptyScriptDate : "2021-02-24"
property ptyScriptAuthor : "JMichaelTX"
### Required: macOS Sierra+ Tested In: macOS Mojave 10.14.6+
use AppleScript version "2.5"
use scripting additions
use framework "Foundation" -- Required for all ASObjC commands
set screenCoord to my getScreenFrame("Full", 2)
-->{2560.0, 0.0, 2560.0, 1440.0}
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on getScreenFrame(pFullOrVisible, pScreenNum)
(* VER: 1.0 2021-02-24
-------------------------------------------------------------------------------
PURPOSE: Get Screen Coordinates of Specified Screen
PARAMETERS:
β’ pFullOrVisible β text β Must be "Full" or "Visible"
β’ pScreenNum β integer β Screen Number, where Main Screen = 1
RETURNS: β list β Screen Coordinates Left, Top, Width, Height
AUTHOR: JMichaelTX
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
*)
set frameType to "frame"
if (pFullOrVisible = "Visible") then set frameType to "visibleFrame"
set screenFrameList to current application's NSScreen's screens()'s valueForKey:(frameType)
set screenFrame to item pScreenNum of (screenFrameList as list)
set screenFrame to (item 1 of screenFrame) & (item 2 of screenFrame)
return screenFrame
end getScreenFrame
--~~~~~~~~~~~~~~~ END OF handler getScreenFrame ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~