New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blacksuitdevelopers/node-process-windows-improved

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blacksuitdevelopers/node-process-windows-improved

View information about running processes, get the active process window, or activate a process's main window.

  • 0.1.4
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

node-node-process-windows

Manage application windows via a Node API - set focus, cycle active windows and get active windows

JavaScript Style Guide

Installation

Requires Node 4+

    npm i @blacksuitdevelopers/node-process-windows-improved

This module is not supported in browsers.

Supported Platforms

Currently, this module is supported on Windows, and has partial support (only active window) for macOS. It uses a .NET console app on Windows, and AppleScript on macOS.

Pull requests are welcome - it would be great to have more of this API work cross-platform.

Usage

  1. Get active processes
    var processWindows = require("node-process-windows");

    var activeProcesses = processWindows.getProcesses(function(err, processes) {
        processes.forEach(function (p) {
            console.log("PID: " + p.pid.toString());
            console.log("MainWindowTitle: " + p.mainWindowTitle);
            console.log("ProcessName: " + p.processName);
        });
    });
  1. Focus a window
    var processWindows = require("node-process-windows");

    // Focus window by process...
    var activeProcesses = processWindows.getProcesses(function(err, processes) {
        var chromeProcesses = processes.filter(p => p.processName.indexOf("chrome") >= 0);

        // If there is a chrome process active, focus the first window
        if(chromeProcesses.length > 0) {
            processWindows.focusWindow(chromeProcesses[0]);
        }
    });

    // Or focus by name
    processWindows.focusWindow("chrome");
  1. Get active window
    var processWindows = require("node-process-windows");

    var currentActiveWindow = processWindows.getActiveWindow((err, processInfo) => {
        console.log("Active window title: " + processInfo.mainWindowTitle);
    });

Contributing

Pull requests are welcome

License

MIT License

Contact

Current version - chesney@nyffels.be

Forked author - https://github.com/adamsoutar
Original author - extr0py@extropygames.com

Keywords

FAQs

Package last updated on 21 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc