1.0.0 • Published 5 years ago
cross-platform-active-window v1.0.0
cross-platform-active-window
Get active window title in Node.js. (fork of https://github.com/octalmage/active-window, which looks to be unmaintained)
Compatible with Linux, Windows 7+, and OSX;
Usage
var monitor = require('active-window');
callback = function(window){
try {
console.log("App: " + window.app);
console.log("Title: " + window.title);
}catch(err) {
console.log(err);
}
}
/*Watch the active window
@callback
@number of requests; infinity = -1
@interval between requests
*/
//monitor.getActiveWindow(callback,-1,1);
//Get the current active window
monitor.getActiveWindow(callback);
Tested on
TODO
- Test on more operating systems.
- Use native APIs.
License
MIT
1.0.0
5 years ago