Package to handle some process from any windows application
npm install windowcppAllow you to handle process from a windows application.
Use the package manager npm or yarn to install Mouse.
``bash`
yarn add windowcpp`bash`
npm install windowcpp
`javascript
const Window = require("windowcpp").default;
const processName = "Process Name"
const window = new Window(processName);
// [...]
`
javascript
window.showWindow("SW_SHOWMAXIMIZED");
` * #### writeMemoryValue(address, message);
Write the message in the current address. See more here.
`javascript
window.writeMemoryValue(0xFF0232DD, "12");
`
* #### getWindowsSize()
Return an object with the height and width of the window.
`javascript
const size = window.getWindowsSize();
console.log(size.height);
console.log(size.width);
`
* #### postMessage(WPARAM);
`javascript
window.postMessage("VK_F12");
`
* #### readMemoryValue(address);
`javascript
const value = window.readMemoryValue(0xFFFFFFFF);
console.log(value);
`
* #### screenshoot(filename);
`javascript
window.screenshoot("./screenshot.jpg");
`
* #### setWindowPosition(hWndInsertAfter, movex, movey, width , height);
Change the position and the size of the window. See more here.
`javascript
window.setWindowPosition("HWND_TOPMOST", 200, 200, 800, 400);
`
* #### setForegroundWindow();
Activate the window and bring to front. See more here.
`javascript
window.setForegroundWindow();
`
* #### leftClick(x: number, y: number): void;
Press left mouse button in the x and y position.
`javascript
window.leftClick(100,100);
`
* #### rightClick(x: number, y: number): void;
Press right mouse button in the x and y position.
`javascript
window.leftRight (100,100);
`
* #### leftAndRightClick(x: number, y: number): void;
Press right and left mouse button in the x and y position.
`javascript
window.leftAndRightClick(100,100);
`
* #### moveMouse(x: number, y: number);
Move the mouse in the x and y position.
`javascript
window.moveMouse(100,100);
``Please make sure to update tests as appropriate.