GithubHelp home page GithubHelp logo

sebweaver / automations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quintus/automations

0.0 1.0 0.0 362 KB

Automations is a Ruby 1.9 project consisting of libraries to fake and simulate (automate) user input like pressing keys or moving windows. Linux X server systems can be automated by using xdotool internally, Windows systems by using AutoItX3.

Ruby 100.00%

automations's Introduction

Automations

First, this is the general README. READMEs for au3 and xdo exist in their subdirectory.

What’s Automations?

Automations is a project targeting input automation for Ruby. You can simulate mouse and keyboard input, access windows as objects and do some other nice things you would have to do by hand otherwise. This is also the main point why the Automations project exists: It aims at helping you to automize (hence the name) some long process for which you probably just sit in front of your screen and hit Enter, select something, hit Enter again, click a button, and so on. If you don’t want to do this over and over again, then Automations is the solution to a Ruby programmer.

What’s needed?

Currently, the Automations project supports both Linux X Server systems and the Microsoft® Windows® platform. If you want to run Automations on Windows®, you need to download the au3 gem. It’s based on the C interface of the AutoIt scripting language, so you’ll need the DLL file AutoItX3.dll which can be easily obtained by downloading AutoIt and then copying the file from the AutoItX subdirectory into your Ruby installation’s bin directory. After that, you should be able to start using au3 by doing a require "au3".

For Linux X Server systems you need, beside the xdo gem, command line tools like xdotool. (see the Wiki for a full list). Ubuntu and Debian users may try to obtain that tools via aptitude, apt-get, the Synaptic GUI or whatever package manager you prefer. Others will have to compile xdotool. Get it from http://www.semicomplete.com/projects/xdotool/ and follow the instructions in the INSTALL file.

Example of usage

Windows®

require "au3"
AutoItX3.move_mouse(100, 100)
AutoItX3.send_keys("AB{ESC}c") #Sends A, B, [ESC], and c
win = AutoItX3::Window.new("Paint")
win.move(25, 25)
win.close

Linux

require "xdo/mouse"
require "xdo/keyboard"
require "xdo/xwindow"
XDo::Mouse.move(100, 100)
XDo::Keyboard.simulate("AB{ESC}c") #Sends A, B, [ESC], and c
xwin = XDo::XWindow.from_name("README")
xwin.move(25, 25)
xwin.close

What’s planned for the future?

  • An equivalent API. XDo::Mouse should have an equivalent AutoItX3::Mouse.
  • Getting rid of AutoIt. Currently I try to conquer the Windows API for that purpose.
  • Getting rid of xdotool. I’m currently working on this in a separate repo, look at http://www.github.com/Quintus/imitator.
  • Combining au3 and xdo into a single gem.

Contact

If you want to contact me, for whatever reason, bugs, contributing, just email me at
sutniuq@@gmx@net.

Initia in potestate nostra sunt, de eventu fortuna iudicat. 

automations's People

Watchers

 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.