0

Is it possible to set/get the position of other windows in node.js in Windows 10/11?

One of my windows keeps moving to my first monitor when Windows goes to sleep / the monitors turn off and it's extremely annoying.

Just want to make a quick script that can get/set a window's position by name.

Example: Say I want to move the window "Discord" to x: 60, y: 55, how would I accomplish this in node.js?

Ran Shorowitz
  • 307
  • 5
  • 11
  • 1
    Node.js is not the best tool for that job. Perhaps you have more luck with python: https://stackoverflow.com/a/7142360/5781499 – Marc Mar 12 '22 at 21:27

1 Answers1

0

I use node-window-manager it works pretty well for these tasks. You an also use AutoHotKey from node in a few different packages, which would be useful for "if window then". There are also "real" window managers that keep windows in specific regions, screens, virtual displays, etc.

hpavc
  • 1,336
  • 7
  • 7