Deno.js Automation Tutorial to Capture Screenshot as PNG Image by Controlling Mouse & Keyboard in TypeScript Using autopilot Module Full Project For Beginners









import AutoPilot from "";

const pilot = new AutoPilot();

// get screen size
const screenSize = await pilot.screenSize();
// move mouse
await pilot.moveMouse(200, 400);
// take a screenshot
await pilot.screenshot("screenshot.png");



Now run the below file by typing the below command as shown below



deno run --allow-write app.ts





Leave a Reply