Good use of the getLocationOnScreen() method.
However, you probably don't want to grab all of the locations up front at the very start of the robot playback. (The user can still drag and move the window between robot actions). I would suggest grabbing the location just before it is used to protect against this.