Allow you to handle process from a windows application.
Use the package manager npm or yarn to install Mouse.
yarn add windowcpp
npm install windowcpp
Work in both: typescript and javascript.
const Window = require("windowcpp").default;
const processName = "Process Name"
const window = new Window(processName);
// [...]
Class to handle your process.
-
See the possible values of nCmdShow here.
window.showWindow("SW_SHOWMAXIMIZED");
-
Write the message in the current address. See more here.
window.writeMemoryValue(0xFF0232DD, "12");
-
Return an object with the height and width of the window.
const size = window.getWindowsSize(); console.log(size.height); console.log(size.width);
-
window.postMessage("VK_F12");
-
const value = window.readMemoryValue(0xFFFFFFFF); console.log(value);
-
window.screenshoot("./screenshot.jpg");
-
Change the position and the size of the window. See more here.
window.setWindowPosition("HWND_TOPMOST", 200, 200, 800, 400);
-
Activate the window and bring to front. See more here.
window.setForegroundWindow();
-
Press left mouse button in the x and y position.
window.leftClick(100,100);
-
Press right mouse button in the x and y position.
window.leftRight (100,100);
-
Press right and left mouse button in the x and y position.
window.leftAndRightClick(100,100);
-
Move the mouse in the x and y position.
window.moveMouse(100,100);
All commands refer to the chosen process.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.