Search code examples
windowshta

Set .HTA to open at specific display location


Have been given an HTML Application .HTA file, but it always opens to the upper left.

1) What can I add to the script so it opens at far right?
2) Can I force it to open in Display 2 (which is to the right of Display 1) instead of Display 1?


Solution

  • window.moveTo(screen.width+2), (screen.height+2);
    </script>
    

    inserted after

    <script language="JavaScript">
    

    moved the HTA to appear just a skosh past the left edge of Display 2 (assuming Display 1 is to the left of Display 2). Problem solved!