{"id":16667469,"url":"https://github.com/bryphe/node-process-windows","last_synced_at":"2025-06-15T19:36:20.573Z","repository":{"id":40239616,"uuid":"66736902","full_name":"bryphe/node-process-windows","owner":"bryphe","description":"Manage application windows via a Node API - set focus, cycle active windows, and get active windows","archived":false,"fork":false,"pushed_at":"2023-11-30T19:41:52.000Z","size":580,"stargazers_count":34,"open_issues_count":14,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T11:48:58.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bryphe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-27T21:45:49.000Z","updated_at":"2024-09-14T07:23:41.000Z","dependencies_parsed_at":"2024-06-18T19:57:54.877Z","dependency_job_id":"cc4c5c11-78e7-4827-9980-7c99a5ad4aae","html_url":"https://github.com/bryphe/node-process-windows","commit_stats":null,"previous_names":["extr0py/node-process-windows"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryphe%2Fnode-process-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryphe%2Fnode-process-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryphe%2Fnode-process-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryphe%2Fnode-process-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryphe","download_url":"https://codeload.github.com/bryphe/node-process-windows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147343,"owners_count":20405942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T11:14:16.384Z","updated_at":"2025-03-21T17:32:22.854Z","avatar_url":"https://github.com/bryphe.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-node-process-windows\n###### Manage application windows via a Node API - set focus, cycle active windows, and get active windows\n\n- [Installation](#Installation)\n    - [Supported Platforms](#Supported_Platforms)\n- [Usage](#Usage)\n- [Contributing](#Contributing)\n- [License](#License)\n- [Contact](#Contact)\n\n## Installation\n\nRequires Node 4+\n\n```\n    npm install node-process-windows\n```\n\nThis module is __not supported__ in browsers.\n\n### Supported Platforms\n\nCurrently, this module is only supported on Windows, and uses a .NET console app to manage windows.\n\nPull requests are welcome - it would be great to have this API work cross-platform.\n\n## Usage\n\n1) Get active processes\n\n```javascript\n    var processWindows = require(\"node-process-windows\");\n\n    var activeProcesses = processWindows.getProcesses(function(err, processes) {\n        processes.forEach(function (p) {\n            console.log(\"PID: \" + p.pid.toString());\n            console.log(\"MainWindowTitle: \" + p.mainWindowTitle);\n            console.log(\"ProcessName: \" + p.processName);\n        });\n    });\n```\n\n2) Focus a window\n\n```javascript\n    var processWindows = require(\"node-process-windows\");\n\n    // Focus window by process...\n    var activeProcesses = processWindows.getProcesses(function(err, processes) {\n        var chromeProcesses = processes.filter(p =\u003e p.processName.indexOf(\"chrome\") \u003e= 0);\n\n        // If there is a chrome process active, focus the first window\n        if(chromeProcesses.length \u003e 0) {\n            processWindows.focusWindow(chromeProcesses[0]);\n        }\n    });\n\n    // Or focus by name\n    processWindows.focusWindow(\"chrome\");\n```\n\n3) Get active window\n\n```javascript\n    var processWindows = require(\"node-process-windows\");\n\n    var currentActiveWindow = processWindows.getActiveWindow((err, processInfo) =\u003e {\n        console.log(\"Active window title: \" + processInfo.mainWindowTitle);\n    });\n```\n\n## Contributing\n\nPull requests are welcome\n\n## License\n\n[MIT License](\"LICENSE\")\n\n## Contact\n\nextr0py@extropygames.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryphe%2Fnode-process-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryphe%2Fnode-process-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryphe%2Fnode-process-windows/lists"}