Git Product home page Git Product logo

node-hide's Introduction

node-hide

Travis NPM Status

Node-hide is an NPM Module that handles all the quirks of hiding and showing windows for you.

Internally node-hide uses "user32.dll" via ffi and so is, for the time being, Windows only.

Quick Start

Install Prerequisites

Make sure you've installed all the necessary build tools for your 'node-gyp', then invoke:

$ npm install node-hide

Note: In order to compile with electron I was required to use electron-rebuild with .\node_modules\.bin\electron-rebuild.cmd -w sqlite3 -p

Examples

var hide = require('node-hide');

var handle = hide.findWindow('Untitled - Notepad') //Track Notepad's ID to Hide it Later

hide.getWindowPosition(handle); // you can get current position of the window
// output {  left: 557,
//           top: 196,
//           right: 1373,
//           bottom: 805}

hide.hideWindow(handle); //Hide Notepad, I can also take an array of handles, e.g. [1115138,331240]
setTimeout(function(){
  hide.showWindow(handle); //Show Notepad After a 1 Second Timeout
},1000);

setTimeout(function(){
  hide.closeWindow(handle); //close Notepad After a 5 Second Timeout
},5000);


hide.visableWindows(function(data){
  console.log(JSON.stringify(data)) //List all the Visable Windows
});
//Output: {"65846":"Program Manager","132154":"Google - Google Chrome",
//         "199568":"GitHub","331240":"Untitled - Notepad","1115138":"npm - Google Chrome"}

Support

If you're having any problem, please raise an issue on GitHub.

Contributors

Thanks to Shawn Rakowski for the initial help on Stack Overflow

License

node-hide is free Open-Source software, and is released under the GPL-3.0 License, further information can be found under the terms specified in the license.

node-hide's People

Contributors

gelzis avatar mrtimcakes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.