Giter Site home page Giter Site logo

khaivu-mta / desktop.robot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucassklp/desktop.robot

0.0 0.0 0.0 8.59 MB

A library used to control your mouse and keyboard programmatically in .NET Core

License: MIT License

Shell 0.07% C++ 3.36% C 2.12% C# 61.76% F# 23.20% Objective-C++ 9.03% Makefile 0.46%

desktop.robot's Introduction

nuget nuget version

Desktop.Robot

This library helps you to automate tasks by simulating inputs (mouse and keyboards) programmatically, inspired in java.awt.Robot

I made this library because the dotnet SDK doesn't support simulation of mouse and keyboard input. The only way of input simulation in the standard framework is by using Windows.Forms which won't run on Linux or OSX.

Installation

If you are using Package Manager:

Install-Package Desktop.Robot -Version 1.5.0

If you are using .NET CLI

dotnet add package Desktop.Robot --version 1.5.0

Advantages

  • Multiplatform: works on Windows, Linux and OSX
  • Built using the Operating System Native and .NET API, other dependencies needed
  • Easy to use

Example of use

using Desktop.Robot;
using Desktop.Robot.Extensions;
namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            var robot = new Robot();
            robot.AutoDelay = 1000;
            robot.MouseMove(100, 100);
            robot.Click();
            robot.Type("A invisible cat is using my PC");
        }
    }
}

Remarks

In order to use the method CreateScreenCapture you will need to install some libraries. This is required by System.Drawing's components

Installing the requirements on Linux

sudo apt install libgdiplus

Current limitations

  1. As we are currently developing this tool, multiple monitors are not supported for now.
  2. The library is under development, and some methods will throw a NotImplementedException

desktop.robot's People

Contributors

lucassklp avatar olivercoad avatar mrdanoak avatar nomis51 avatar susch19 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.