Giter Club home page Giter Club logo

gui-agent's Introduction

GUI-Agent

"Scripting user activity is a hard thing to do" - me

About

This project aims at creating a system for scripting user activity inside computer systems using computer vision and peripheral devices. The technologies used are the following

  • OpenCV
  • Jython
  • Java
  • GraphLib

Tons of inspiration was taken from the Sikuli project and until I get on good terms with VirtualBox SDK this project can be seen as a inferior version of Sikuli. THe goal is to enable automization of guest systems in VirtualBox

Install

All you have to do are the following esoteric tasks taken right out of M. C. Escher’s wildest nightmares:

  • Install java
  • Download OpenCV
  • Make sure the OpenCV library is present in your library path, on Windows this is your PATH varaible
  • Git clone this repo
  • Done

Use

The primary way this project is meant to be used involves creating jython scripts that interacts with the function calls in the API.java file. Some example scripts are present in the project and can be executed using the following command

java -jar lib\jython.jar scripts\<filename>.py

More features are expected to be added as the project proceeds. The primary focus right now is to make the software somewhat useable.

Keep in mind that all files referenced in the scripts are relative to the current working dir

###Keyboard interactions This has proven to be the hardest nut to crack (apart from the entire "computer vision" thing). I searched for good tools but couldn't find anything I liked. I decided to use what already was present in the java environment and this resulted in the java Robot class.

I've built a text parser to spare the user from scripting the robot by itself. The API can now take a string following the EMACS style of expressing key-combinations. That is, for example ctr+c and ctr+v being represented as the string:

C-cC-v

and more complex stuff like typing "Hello World" either being done by:

Hello World

but also using shift modifier

S-hello S-world

this way has the added advantage of enabling more than the key codes that have dedicated keyboard-keys. For example the "!" character hiding under "1"

S-1

The full list of modifiers are the following:

S- Shift
W- Windows
C- Control 
M- Alt

When API.type() is called the call finishes with a ENTER.

As with everything the keyboard parser is a work in progress and does not support scoping more than one key to a modifier.

gui-agent's People

Contributors

sci10n avatar

Watchers

 avatar waewta 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.