No announcement yet.

Dual Monitor hotkey script

  • Filter
  • Time
  • Show
Clear All
new posts

    Dual Monitor hotkey script

    I've been using the hotkey dual monitor script that Ian has created. Thank you Ian.
    I've had some partial success getting this script going.
    The first part has been ok, ie winmove to resize revit to span dual monitors. This is useful in itself.
    I've had problems resizing revit windows, ie elevation, plans correctly
    Firstly it seems I cannot load the original script with out adding some numerals. This doesn't seem right.
    I have attached script error FYI.
    I worked around this by adding a numeral into blank space which is what I thought it wanted. This allows script to be loaded but problem then is that plan, elevation windows are not able to be resized or repositioned correctly. I can adjust the X direction of the window but not the Y direction or size of the window.
    I feel that I'm close to cracking this and that it will be really useful. I suspect one day this will be a standard control. (why isn't it already?!)
    What am I missing?
    Thx people.
    Attached Files

    I've been fiddling around with this and I've gone and lost some of my windows, sheets. They have been pushed down beyond the extend of visible window. I didn't know this was possible and I don't know how to get them back.


      Ok. I've answered my own post. I thought I might share this as I think its quite useful and I know some others have been stumbling at this one.
      I re-worked the script (monkey at a typewriter style) Ian posted. It required the brackets taken out of the (internal) revit windows co-ordinates, as below.
      Thanks again Ian this is really sweet mate.

      SetTitleMatchMode, 2


      WinMove, Revit,,0,0, 3850, 1080

      ControlGet, ctrlH, HWND,, Elevation, Revit
      WinMove, ahk_id %ctrlH%,,1650,0, 1650, 950
      Send, zf

      ControlGet, ctrlH, HWND,, Floor Plan, Revit
      WinMove, ahk_id %ctrlH%,,0,0, 1640, 850
      Send, zf

      ControlGet, ctrlH, HWND,, Section, Revit
      WinMove, ahk_id %ctrlH%,,1650,0, 1900,850
      Send, zf

      ControlGet, ctrlH, HWND,, Ceiling Plan, Revit
      WinMove, ahk_id %ctrlH%,,0,0, 1650,950
      Send, zf

      ControlGet, ctrlH, HWND,, Sheet, Revit
      WinMove, ahk_id %ctrlH%,,0,1650, 1650,950
      Send, zf

      ControlGet, ctrlH, HWND,, 3D View, Revit
      WinMove, ahk_id %ctrlH%,,1600,500, 1200,1050
      Send, zf


        Hi Redmonki,

        Good to see you have got it going.

        As there appears to have been some changes under the hood for Revit, I am looking to rework the code to use the ControlMove AHK function rather than WinMove. The benifit of this, presuming I get it working, is that it will enable us to move the active child window to either screen, rather than rely on the window name (Plan, elevation etc).

        Unfortuneately, I haven't had a lot of spare time over the past month or so, but I hope that things will quieten down shortly and I can spend a few hours looking at it.

        Ian Kidston


        Related Topics