Desktop.Robot_Net8_v
1.5.2
dotnet add package Desktop.Robot_Net8_v --version 1.5.2
NuGet\Install-Package Desktop.Robot_Net8_v -Version 1.5.2
<PackageReference Include="Desktop.Robot_Net8_v" Version="1.5.2" />
paket add Desktop.Robot_Net8_v --version 1.5.2
#r "nuget: Desktop.Robot_Net8_v, 1.5.2"
// Install Desktop.Robot_Net8_v as a Cake Addin #addin nuget:?package=Desktop.Robot_Net8_v&version=1.5.2 // Install Desktop.Robot_Net8_v as a Cake Tool #tool nuget:?package=Desktop.Robot_Net8_v&version=1.5.2
<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 | net8.0 is compatible. 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. |
-
net8.0
- System.Drawing.Common (>= 8.0.6)
- System.Reactive (>= 6.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.