Native cross-platform system automation

Overview

ROBOT

Native System Automation

Built with Robot Version 2.0.0 Docs API ZLIB Licensed

GET STARTED  |  DOCUMENTATION  |  API  |  COMMUNITY

Introducing Robot for C++, a library aimed at facilitating the development of system automation software for the purposes of test automation, self-running demos, and other applications. The library works by abstracting away all platform-specific differences into a single, robust API compatible with most desktop operating systems. Functionality ranges from basic keyboard and mouse automation to advanced process manipulation capabilities. It has everything you need to take full control of your system. Visit the Homepage for more information.

Comments
  • Add the ability to check if app is running as admin

    Add the ability to check if app is running as admin

    Today I came across this cool library and one of the options there is to be able to check if the running application is running as admin. There are quite the number of uses for this so its worth implementing.

    Request Research 
    opened by dkrutsko 5
  • Not all processes are being enumerated

    Not all processes are being enumerated

    I have observed that not all processes get enumerated on Windows in certain situations. A good example of this is a process running as another user. This needs to be further investigated. The same problem might exist with window enumeration as well.

    Bug Research Win 
    opened by dkrutsko 4
  • Add support for dispatching input on specific window

    Add support for dispatching input on specific window

    Would it be possible to allow input such as a key or mousepress on a specific window, without it being active? All inputs are currently global. I'm not entirely sure if this is possible cross platform, but windows itself should allow this.

    PS: loving the node version of robot so far, it's great!

    Duplicate Request 
    opened by philipfeldmann 3
  • keyboard.sendMessage in background to windowhandle

    keyboard.sendMessage in background to windowhandle

    Hey, guys. I love this library. I'm currently developing a bot for a game that should also work in the background. Most of my bots I developed with C#. There I was also able to send keystrokes for games in the background.

    I also want this functionality for robot-js. REF: MSDN::SendMessage function

    Best regards

    Duplicate Request 
    opened by fortiZde 2
  • Improve test case flexibility

    Improve test case flexibility

    Right now it's a huge pain to test the library. There's no way of skipping specific tests and some of those tests take up a lot of time to perform. We need to streamline the whole process and only select tests that need to be ran on a test by test basis.

    Request 
    opened by dkrutsko 2
  • Keyboard can't type the character '$'

    Keyboard can't type the character '$'

    As $ is the special character for typing the system key, you can't use it normally. I tried escaping it ({$} or {DOLLAR}) and it doesn't work either. I see no mention of this in the documentation or code. I may be missing it, but it doesn't seem like there is any way to type a literal $ using the Robot Keyboard.

    Question 
    opened by joeskeen 1
  • Remove custom data type declarations

    Remove custom data type declarations

    Since C++11 already provides standardized data type declarations, it might be worth just removing the ones defined by robot. This means that types like int32 will turn into int32_t. Not yet sure whether this type of breaking change qualifies a major version bump. Perhaps this will be done in two parts: Deprecate the current types and point them to cstdint, then, after some time, remove them entirely.

    Wont Fix Request 
    opened by dkrutsko 1
  • `./configure; make; sudo make install` should work as expected

    `./configure; make; sudo make install` should work as expected

    I believe that this project should provide a standard interface from its Makefile. This change changes the default command to make build instead of make help. It also makes a blank configure script.

    Request 
    opened by czipperz 1
  • Adding CMakeLists.txt to increase

    Adding CMakeLists.txt to increase

    This is a potential fix for #17 . I have tested several configurations for windows and Ubuntu, including static and shared library configs with Clang, GCC, MinGW and visual studio community edition.

    I am quite confident this will work with any Linux that is at all adheres to the LSB, like Red hat, Fedora and less so for Gentoo, Arch (I still think it'll work).

    I do not have a Mac OS X machine to test with. But I suspect that will not work because it is missing some linking options.

    There are a few functions that could be implemented better for MinGW, Process::Open I pretty much implemented as No-op. It also looks like a few shortcomings in the winuser.h and winbase.h implementation in the MinGW SDK, these will likely require bugfixes in MinGW.

    Here are some things that this does not address that the previous build files do:

    • This does not address the install process.
    • This does not add "d" to the name.
    • Mac OS X linking options and Objective-C++ options are missing.
    • The Peon testing tool is not included.
    • This removed .BIN from the executable names.
    • I am unsure if I am missing any msvc options.
    opened by Sqeaky 1
  • Implement an ability to create windows

    Implement an ability to create windows

    Need to add an ability to create windows:

    static Window Window::Create ( ... );
    

    From there, we can look into ways of creating transparent overlays, rendering graphics, etc. The biggest hurdle is figuring out the scope and what we could actually do. Obviously writing a UI framework is out of the question but how would we go about displaying stuff on windows? Perhaps we'll need to integrate with a library of some sort? Maybe just have one function to draw an image?

    Wont Fix Request 
    opened by dkrutsko 1
  • Give user an ability to adjust user privileges

    Give user an ability to adjust user privileges

    On Windows, in order for some functionality to work, such as manipulating a process owned by another user account, an application must have a method of granting itself elevated privileges. Specifically, SE_DEBUG_NAME. This is typically done through: OpenProcessToken, LookupPrivilegeValue and AdjustTokenPrivileges. Such a function would probably need to be implemented in a System class (#50) and would need to have the ability to be enabled and disabled.

    Since SE_DEBUG_NAME is one of the few privileges that is required by Robot, it might be the only one worth supporting, however, it might be just as easy to support all possible privileges, all in one function. We'll see.

    Request Research 
    opened by dkrutsko 0
  • `Image.Create()` does not zero allocated memory.

    `Image.Create()` does not zero allocated memory.

    When Image.Create() is called, it may (if the existing buffer is not already large enough, or if no buffer yet exists) allocate a new buffer. It allocated the buffer without initializing it, so whatever data happens to be in memory already ends up in the image. This can lead at best to some weird images if the new memory happens to contain non-zero pre-existing data, and a security issue at worst if the image with uninitialized pixels is being output somewhere non-privileged. I'll file a PR to fix this.

    Bug 
    opened by p120ph37 0
  • Improve the hash rate of the Hash function

    Improve the hash rate of the Hash function

    Currently, the Hash class has abysmal performance when compared to other CRC32 algorithms. Looking at our options here, here and here, it's clear that there's a lot of improvements which could be made. Read the table below to see how we compare (Ignore the differences in the result as the comparison uses the iSCSI/Castagnoli polynomial where as we use the Ethernet/ZIP one).

    | Option | Result | Performance | |:---------------------|:-----------|:--------------------------------| | Naive - CPP | 0xA0B96C51 | 147.0 MB/s = 0.29 bits/cycle | | Tabular - 1 byte | 0xA0B96C51 | 556.6 MB/s = 1.11 bits/cycle | | Robot - Hash | 0x1D75653D | 561.1 MB/s = 1.12 bits/cycle | | Tabular - 2 bytes | 0xA0B96C51 | 795.3 MB/s = 1.59 bits/cycle | | Hardware - 1 byte | 0xA0B96C51 | 1324.1 MB/s = 2.65 bits/cycle | | Tabular - 4 bytes | 0xA0B96C51 | 1369.0 MB/s = 2.74 bits/cycle | | Tabular - 8 bytes | 0xA0B96C51 | 2416.1 MB/s = 4.83 bits/cycle | | Checksums - AWS | 0x1D75653D | 2682.3 MB/s = 5.36 bits/cycle | | Tabular - 16 bytes | 0xA0B96C51 | 4011.5 MB/s = 8.02 bits/cycle | | Hardware - 8 bytes | 0xA0B96C51 | 10538.0 MB/s = 21.08 bits/cycle | | Golden - AMD | 0xA0B96C51 | 19564.9 MB/s = 39.13 bits/cycle | | Golden - Intel | 0xA0B96C51 | 30507.4 MB/s = 61.01 bits/cycle |

    Request 
    opened by dkrutsko 0
  • Improper `GetAsyncKeyState` usage

    Improper `GetAsyncKeyState` usage

    Contrary to superficial appearances, GetKeyState and GetAsyncKeyState actually have significantly different behavior, aside from skipping the input buffer queue.

    GetKeyState: docs

    If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled.

    • Allows detection of lock-key toggle state (e.g. "is CapsLock on?")
    • Allows detection of currently-pressed state (e.g. "is CapsLock being pressed?")

    GetAsyncKeyState: docs

    If the most significant bit is set, the key is down If the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. However, you should not rely on this last behavior

    • Does not detect toggle state (try it! Note, this is different from the way Robot works on OSX)
    • Allows detection of "recent" keypresses (almost useless since this can get reset by other processes, and is different from the way Robot works on OSX)
    • Allows detection of currently-pressed state (e.g. "is CapsLock being pressed?")

    I think Robot should probably be using GetKeyState rather than GetAsyncKeyState. The reasoning for using GetAsyncKeyState is that it allows you to check the current realtime keyboard state regardless of queued input to your process, however it is your process so you could just as well drain your input before calling GetKeyState to get the same result, with the added benefit that you can obtain lock-key toggle information, and can also obtain input-buffer key information if you want.

    One still-missing feature would be the ability to distinguish between CapsLock-on-and-down, CapsLock-on-and-up, and CapsLock-off-and-down. Unfortunately, sorting this out would probably require a new method signature other than bool Keyboard::GetState (Key keycode), and it's fairly rare to need to know if CapsLock (or ScrollLock or NumLock) is actually being pressed at the moment.

    Bug 
    opened by p120ph37 1
Releases(2.0.0)
Owner
Robot
Native cross-platform system automation
Robot
DIY LCD touchscreen for Home Automation

HA SwitchPlate HASPone The HASPone is a DIY touchscreen controller you can mount into a standard North American work box. It connects to your home aut

null 318 Dec 30, 2022
Home automation light switch controller

Home Automation Light Switch Controller Copyright 2019-2021 SuperHouse Automation Pty Ltd www.superhouse.tv A modular Light Switch Controller for DIY

SuperHouse Automation 11 Mar 27, 2022
Universal State Monitor software for home automation input devices

Universal State Monitor Copyright 2019-2021 SuperHouse Automation Pty Ltd www.superhouse.tv A binary state monitor for DIY home automation projects. T

SuperHouse Automation 3 Aug 24, 2021
The C++ Automation Language

Circle The C++ Automation Language 2021 Sean Baxter Download here Follow me on Twitter @seanbax for compiler updates. NEW CUDA NEW Pattern Matching NE

Sean Baxter 1.5k Dec 25, 2022
AI-powered Smart Robotic Process Automation 🤖

Automagica The Automagica project began in 2018 with a focus on creating open source software to ensure that Robotic Process Automation technologies w

Automagica 2.7k Dec 27, 2022
Plays native alert sound and shows native dialogs/alerts in your Flutter app.

flutter_platform_alert 2021 © Weizhong Yang a.k.a zonble. A simple plugin to present native alerts, including playing alert sounds and showing alert d

Weizhong Yang a.k.a zonble 60 Dec 21, 2022
Visual Studio native debugger extension to help debug native applications using Mono.

Unity Mixed Callstack UnityMixedCallstack is a Visual Studio 2017/2019 extension to help debug native applications embedding Mono, like Unity. If you

Unity Technologies 83 Nov 28, 2022
The Leap Motion cross-format, cross-platform declarative serialization library

Introduction to LeapSerial LeapSerial is a cross-format, declarative, serialization and deserialization library written and maintained by Leap Motion.

Leap Motion (Ultraleap) 15 Jan 17, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 286 Dec 14, 2022
Freeze OS is a cross-platform operating system emulator that runs on top of an interpreter called the Freeze interpreter.

Freeze OS is a cross-platform operating system emulator that runs on top of an interpreter called the Freeze interpreter. The operating system code is basically written in the Freeze programming language that is passed to the Freeze interpreter. The idea is to skip instances where the operating system needs to handle low level operators and focus on higher level stuff, like malware analysis, AI, and others.

null 24 May 2, 2022
Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minimal overhead!

Jimp native Make your sever-side Jimp code run 10x faster! Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minim

Sjoerd 17 Oct 10, 2022
A Lilu plugin that makes System Information recognize your Realtek card reader as a native one

Realtek Card Reader Driver Friend Introduction A Lilu plugin that makes System Information recognize your Realtek card reader as a native one. Support

FireWolf 57 Nov 30, 2022
CMake-based build system for node.js native modules

Node CMake A CMake-based build system for Node.js native modules, for CMake >= v3.1. Newly rewritten for 2.0! New Features Drop-in execution compatibi

Colin Taylor 77 Dec 14, 2022
Cross-platform C++11 header-only library for memory mapped file IO

mio An easy to use header-only cross-platform C++11 memory mapping library with an MIT license. mio has been created with the goal to be easily includ

null 1.4k Jan 9, 2023
Cross-platform, Serial Port library written in C++

Serial Communication Library (Linux and OS X) (Windows) This is a cross-platform library for interfacing with rs-232 serial like ports written in C++.

William Woodall 1.7k Dec 30, 2022
Collection of cross-platform single-header C libraries for doing a lot of stuff! (Still WIP)

ice_libs Collection of cross-platform single-header C libraries for doing a lot of stuff! (Still WIP) Brief ice_libs is collection of Single-Header C

Rabia Alhaffar 118 Dec 6, 2022
A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

null 25 Dec 11, 2022
Cross-platform tool to extract wavetables and draw envelopes from sample files, exporting the wavetable and generating the appropriate SFZ text to use in a suitable player.

wextract Cross-platform tool to extract wavetables and draw envelopes from sample files, exporting the wavetable and generating the appropriate SFZ te

Paul Ferrand 9 Jan 5, 2022
Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Young 1.4k Dec 30, 2022