Categorygithub.com/christopher-dg/robotscript
repositorypackage
0.0.0-20180609190755-cafa7712325c
Repository: https://github.com/christopher-dg/robotscript.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

RobotScript

Build Status

RobotScript is a scriptable, cross-platform desktop automation tool.

Installation

Statically linked binaries will be available for download here once the project is functional. In the meantime, feel free to build it yourself.

Usage

robotscript script.yml

Script Reference

Script files are written in YAML format. The commands are fairly self-explanatory/self-documenting. Here is a comprehensive example:

commands:
  - mouse:                 # command: moves the mouse cursor
      x: 200               # required: integer: x pixel
      y: 200               # required: integer: y pixel
      relative: false      # optional: boolean: moves cursor relative to original position
      smooth: true         # optional: boolean: moves cursor smoothly instead of instantly
  - click:                 # command: clicks a mouse button
      button: left         # required: string: mouse button (left, right, or center)
  - keypress:              # command: presses a key
      key: c               # required: string: key to be pressed (case insensitive)
      mods:                # optional: list<string>: modifier keys
        - shift            # note: this must be a list, even if there's only one
  - sleep:                 # command: does nothing for some time
      seconds: 1           # required: integer: seconds to wait
  - type:                  # command: types some text
      text: hello, world   # required: string: text to be typed
  - exec:                  # command: executes a program
      program: stat        # required: string: program to run
      args: /tmp/fakefile  # optional: string: command line arguments (not a list)

For a key naming reference, see here.

Acknowledgements

The following open source libraries have made my life much easier: