1.4.0 β’ Published 10 months ago
get-window-position v1.4.0
get-window-position
get-window-position is a Node.js addon that lets you get the position of a window by its name. It works by hooking into the native Windows API.
π Installation
To rebuild the addon, make sure you have Python, node-gyp, and windows-build-tools installed. You can then install this addon using one of the following methods:
Install from a local directory:
npm install /path/to/this/directory
Install from npm:
npm install get-window-position
π Usage
You can use get-window-position in your code like this:
import { getWindowPositionByName } from 'get-window-position'
const position = getWindowPositionByName('Spotify Premium')
console.log(position)
π‘Some use cases
This can be useful, for example, if you want to:
Move a window to a specific position on the screen Overlay a window on top of another window
Hope this helps someone!