1

On Windows 7 I can use:

  • Win + Shift + Arrow Left to move a window to the left monitor
  • Win + Shift + Arrow Right to move a window to the right monitor

I can also use UltraMon to set up a keyboard shortcut to move a window to the next or previous monitor.

enter image description here

But sometimes I need to move a window to the bottom/top, in my case between monitors 3 and 4 and between monitors 5 and 6:

enter image description here

Is there a program - free if possible - that can move a window to the bottom/top monitor with a keyboard shortcut on Windows 7 SP1 x64 Ultimate?

I see that AHK might have some functions for it, e.g. WindowPad and WindowPadX, but it's not clear to me how to set such a keyboard shortcut (so if you mention AHK in your answer please give me the function's code).

2 Answers 2

1

I do not have that many monitors but did you ever try WinSplit Revolution? It is free and works well for at least 2 monitors.Well, it turns out it is being discontinued. You can still download it from CNET - just be aware of possible adware etc.

The developer of Winsplit Revolution recommended a paid program ($20).

1

I think WindowPad only works on two monitors. I wrote an AHK script that should work on your monitor setup, but I can't replicate this setup so I have no means of testing it. Please let me know if there are any issues and I'll update it, or feel free to edit the answer yourself.

Usage:

Win + Alt + Arrow: Move the active window to the monitor whose direction is indicated by the arrow. Note that this may cause your window to move outside the screen if you try to go up from monitor 2 or right from monitor 3 in your setup. I'll update it in the future.

Win + Alt + Number: Move the active window to the given monitor number

#Persistent

SysGet, MonitorCount, MonitorCount


#!Up::
  GoSub CalculateDisplacement
  WinMove, A, , %xPos%, %displaceYneg%
  return
#!Down::
  GoSub CalculateDisplacement
  WinMove, A, , %xPos%, %displaceYpos%
  return
#!Left::
  GoSub CalculateDisplacement
  WinMove, A, , %displaceXneg%, %yPos%
  return
#!Right::
  GoSub CalculateDisplacement
  WinMove, A, , %displaceXpos%, %yPos%
  return

#!1::
  GoSub CalculateDisplacement
  WinMove, A, , %xPosOn1%, %yPosOn1%
  return

#!2::
  if (MonitorCount > 1) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn2%, %yPosOn2%
  }
  return

#!3::
  if (MonitorCount > 2) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn3%, %yPosOn3%
  }
  return

#!4::
  if (MonitorCount > 3) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn4%, %yPosOn4%
  }
  return

#!5::
  if (MonitorCount > 4) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn5%, %yPosOn5%
  }
  return

#!6::
  if (MonitorCount > 5) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn6%, %yPosOn6%
  }
  return

#!7::
  if (MonitorCount > 6) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn7%, %yPosOn7%
  }
  return

#!8::
  if (MonitorCount > 7) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn8%, %yPosOn8%
  }
  return

#!9::
  if (MonitorCount > 8) {
    GoSub CalculateDisplacement
    WinMove, A, , %xPosOn9%, %yPosOn9%
  }
  return


CalculateDisplacement:
  WinGetPos, xPos, yPos, , , A
  Loop, %MonitorCount% {
    SysGet, MonitorDimension, Monitor, %A_Index%
    if (xPos > MonitorDimensionLeft and xPos < MonitorDimensionRight and yPos < MonitorDimensionBottom and yPos > MonitorDimensionTop) {
      currentMonitor = %A_Index%
    }
  }
  SysGet, thisMonitor, Monitor, %currentMonitor%
  displaceXpos := xPos + thisMonitorRight - thisMonitorLeft
  displaceYpos := yPos + thisMonitorTop - thisMonitorBottom
  displaceXneg := xPos - thisMonitorRight + thisMonitorLeft
  displaceYneg := yPos - thisMonitorTop + thisMonitorBottom
  Loop, %MonitorCount% {
    SysGet, nextMonitor, Monitor, %A_Index%
    xPosOn%A_Index% := xPos - thisMonitorLeft + nextMonitorLeft
    yPosOn%A_Index% := yPos - thisMonitorTop + nextMonitorTop
  }
  return

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.