specs_window
Advanced tools
Comparing version 1.4.0 to 1.5.0
const specs = require('./build/Release/specs_window'); | ||
async function get_Processes(){ return specs.GetProcesses() } | ||
async function Kill_Processe(PID){ return specs.KillProcesse(PID) } | ||
module.exports = { | ||
@@ -16,3 +19,4 @@ getProcessorsNumber: specs.getProcessorsNumber, | ||
MoveMouse: specs.MoveMouse, | ||
getProcesses: specs.GetProcesses, | ||
getProcesses: get_Processes, | ||
KillProcesse: Kill_Processe, | ||
} |
{ | ||
"name": "specs_window", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "It is a NodeJS module to get hardware informacions.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Specs for Windows 🪟: | ||
## Installation: | ||
It is a NodeJS module to get hardware informacions. | ||
It is a NodeJS module to get hardware and OS informacions. | ||
@@ -26,2 +26,3 @@ ```` | ||
- Get Processes; | ||
- Kill Processes; | ||
- Get Cursor/Mouse position; | ||
@@ -185,3 +186,3 @@ - Move Cursor/Mouse; | ||
This func return a array with all process running in machine. | ||
This func return a array with __all__ process running in machine. | ||
@@ -191,8 +192,8 @@ ````JS | ||
Object.values(specs.getProcesses()).forEach((Processe) => { | ||
console.log(Processe) | ||
specs.getProcesses().then((res) => { | ||
res.forEach(element => {console.log(element)}); | ||
}) | ||
//or: | ||
console.log(specs.getProcesses()) | ||
specs.getProcesses().then((res) => {console.log(res)}) | ||
```` | ||
@@ -223,2 +224,18 @@ | ||
### Kill Processes ☠️🌀: | ||
The func KillProcesse takes an int as an argument to represent the processe id (PID). | ||
In this exemple, I kill Micrsoft Edge processe. | ||
````JS | ||
const specs = require('specs_window') | ||
specs.getProcesses().then((res) => { | ||
res.forEach(Processe => { | ||
if(Processe.Name == "msedge.exe") | ||
specs.KillProcesse(Processe.PID).then((kill) => {console.log(kill)}) | ||
}); | ||
}) | ||
```` | ||
### Get Cursor/Mouse position 🐁🗺️: | ||
@@ -225,0 +242,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6222044
18
274