Desktop.Robot
1.5.0
dotnet add package Desktop.Robot --version 1.5.0
NuGet\Install-Package Desktop.Robot -Version 1.5.0
<PackageReference Include="Desktop.Robot" Version="1.5.0" />
paket add Desktop.Robot --version 1.5.0
#r "nuget: Desktop.Robot, 1.5.0"
// Install Desktop.Robot as a Cake Addin #addin nuget:?package=Desktop.Robot&version=1.5.0 // Install Desktop.Robot as a Cake Tool #tool nuget:?package=Desktop.Robot&version=1.5.0
<p align="center"> <img src="Resources/logo.png" width="300px"> </p> <p align="center"> <a href="https://www.nuget.org/packages/Desktop.Robot"><img alt="nuget" src="https://img.shields.io/nuget/dt/Desktop.Robot.svg"></a> <a href="https://www.codacy.com/gh/lucassklp/Desktop.Robot/dashboard?utm_source=github.com&utm_medium=referral&utm_content=lucassklp/Desktop.Robot&utm_campaign=Badge_Grade"> <img src="https://app.codacy.com/project/badge/Grade/985f1cdd1034486cbb00a3fd3e4fff19"/> </a> <a href="https://www.nuget.org/packages/Desktop.Robot"><img alt="nuget version" src="https://img.shields.io/nuget/v/Desktop.Robot.svg"></a> </p>
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
- As we are currently developing this tool, multiple monitors are not supported for now.
- The library is under development, and some methods will throw a NotImplementedException
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- System.Drawing.Common (>= 6.0.0)
- System.Reactive (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Desktop.Robot:
Repository | Stars |
---|---|
lucassklp/Desktop.Robot
A library used to control your mouse and keyboard programmatically in .NET Core
|
Version | Downloads | Last updated |
---|---|---|
1.5.0 | 46,205 | 7/10/2023 |
1.4.1 | 193 | 7/3/2023 |
1.4.0 | 157 | 6/27/2023 |
1.3.2 | 4,868 | 9/10/2022 |
1.3.1 | 55,129 | 12/20/2021 |
1.3.0 | 337 | 12/19/2021 |
1.2.4 | 468 | 11/7/2021 |
1.2.3 | 391 | 11/6/2021 |
1.2.3-alpha | 217 | 11/6/2021 |
1.2.2-alpha | 225 | 8/24/2021 |
1.2.1 | 696 | 6/13/2021 |
1.1.1 | 452 | 5/22/2021 |
1.1.0 | 375 | 5/21/2021 |
1.0.0 | 366 | 5/11/2021 |
1.0.0-alpha | 507 | 1/30/2021 |