my $wid = WaitWindow('Notepad', 5); # Paranoia - make sure we are affecting the desired window SetActiveWindow($wid); SetFocus($wid); SetForegroundWindow($wid); # Used to determine where to move the mouse later my ($left, $top, $right, $bottom) = GetWindowRect($wid); # Enable moving the mouse to move the window # I *THINK* this will work SendKeys("%{SPACE}M{DOWN}"); my ($x, $y) = calculate_position_from($left, $top, $right, $bottom); MouseMoveAbsPix($x,$y); SendKeys("{ENTER}");