Skip to content

Commit

Permalink
Reorganize readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dthree committed Sep 11, 2015
1 parent 94bdb16 commit b009e13
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
RobotJS
========

[![Build Status](https://api.travis-ci.org/octalmage/robotjs.svg?branch=master)](https://travis-ci.org/octalmage/robotjs) [![Join the chat at https://gitter.im/octalmage/robotjs](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg)](https://gitter.im/octalmage/robotjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Wat: Documented](https://img.shields.io/badge/wat-documented-blue.svg)](https://github.com/dthree/wat)
[![npm version](https://img.shields.io/npm/v/robotjs.svg)](https://www.npmjs.com/package/robotjs)
[![Ready](https://badge.waffle.io/octalmage/robotjs.svg?label=ready&title=Ready)](http://waffle.io/octalmage/robotjs)

> Node.js Desktop Automation. Control the mouse, keyboard, and read the screen.
RobotJS supports Mac, [Windows](https://github.com/octalmage/robotjs/issues/2), and [Linux](https://github.com/octalmage/robotjs/issues/17).
Expand All @@ -9,11 +14,19 @@ This is a work in progress so the exported functions could change at any time be

[Check out some of the cool things people are making with RobotJS](https://github.com/octalmage/robotjs/wiki/Projects-using-RobotJS)! Have your own rad RobotJS project? Feel free to add it!

[![npm version](https://img.shields.io/npm/v/robotjs.svg)](https://www.npmjs.com/package/robotjs) [![Build Status](https://api.travis-ci.org/octalmage/robotjs.svg?branch=master)](https://travis-ci.org/octalmage/robotjs) [![Ready](https://badge.waffle.io/octalmage/robotjs.svg?label=ready&title=Ready)](http://waffle.io/octalmage/robotjs) [![Join the chat at https://gitter.im/octalmage/robotjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/octalmage/robotjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Contents

- [Installation](#installation)
- [Getting Started](#getting-started)
- [API](https://github.com/octalmage/robotjs/wiki/Syntax)
- [Building](#building)
- [Plans](#plans)
- [Progress](#progress)
- [License](#license)

## Installing
## Installation

Please make sure you have the [required dependencies](https://github.com/TooTallNate/node-gyp/#installation) before installing:
Please ensure you have the [required dependencies](https://github.com/TooTallNate/node-gyp/#installation) before installing:

* Windows
* Visual Studio 2013 (Express works fine).
Expand All @@ -33,10 +46,13 @@ npm install robotjs
```
I [plan on](https://github.com/octalmage/robotjs/issues/64) using node-pre-gyp to make this process easier.

## Examples
Get the mouse position, move it, then click.
## Getting Started

##### Mouse

```JavaScript
//Get the mouse position, move it, then click.

var robot = require("robotjs");

//Get the mouse position, returns an object with x and y.
Expand All @@ -49,10 +65,11 @@ robot.moveMouse(mouse.x, mouse.y + 100);
//Left click!
robot.mouseClick();
```

Type "Hello World" then press enter.
##### Keyboard

```JavaScript
// Type "Hello World" then press enter.

var robot = require("robotjs");

//Type "Hello World".
Expand All @@ -61,9 +78,12 @@ robot.typeString("Hello World");
//Press enter.
robot.keyTap("enter");
```
Get pixel color under the mouse.

##### Screen

```JavaScript
// Get pixel color under the mouse.

var robot = require("robotjs");

//Get mouse position.
Expand All @@ -73,9 +93,10 @@ var mouse = robot.getMousePos();
var hex = robot.getPixelColor(mouse.x, mouse.y);
console.log("#" + hex + " at x:" + mouse.x + " y:" + mouse.y);
```

Read the [Wiki](https://github.com/octalmage/robotjs/wiki) for more information!

## (API)[https://github.com/octalmage/robotjs/wiki/Syntax]

## Building

node-gyp is required to build RobotJS.
Expand Down

0 comments on commit b009e13

Please sign in to comment.