Skip to content

Commit b009e13

Browse files
committed
Reorganize readme
1 parent 94bdb16 commit b009e13

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

README.md

+30-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
RobotJS
22
========
33

4+
[![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)
5+
[![Wat: Documented](https://img.shields.io/badge/wat-documented-blue.svg)](https://github.com/dthree/wat)
6+
[![npm version](https://img.shields.io/npm/v/robotjs.svg)](https://www.npmjs.com/package/robotjs)
7+
[![Ready](https://badge.waffle.io/octalmage/robotjs.svg?label=ready&title=Ready)](http://waffle.io/octalmage/robotjs)
8+
49
> Node.js Desktop Automation. Control the mouse, keyboard, and read the screen.
510
611
RobotJS supports Mac, [Windows](https://github.com/octalmage/robotjs/issues/2), and [Linux](https://github.com/octalmage/robotjs/issues/17).
@@ -9,11 +14,19 @@ This is a work in progress so the exported functions could change at any time be
914

1015
[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!
1116

12-
[![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)
17+
## Contents
18+
19+
- [Installation](#installation)
20+
- [Getting Started](#getting-started)
21+
- [API](https://github.com/octalmage/robotjs/wiki/Syntax)
22+
- [Building](#building)
23+
- [Plans](#plans)
24+
- [Progress](#progress)
25+
- [License](#license)
1326

14-
## Installing
27+
## Installation
1528

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

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

36-
## Examples
37-
Get the mouse position, move it, then click.
49+
## Getting Started
50+
51+
##### Mouse
3852

3953
```JavaScript
54+
//Get the mouse position, move it, then click.
55+
4056
var robot = require("robotjs");
4157

4258
//Get the mouse position, returns an object with x and y.
@@ -49,10 +65,11 @@ robot.moveMouse(mouse.x, mouse.y + 100);
4965
//Left click!
5066
robot.mouseClick();
5167
```
52-
53-
Type "Hello World" then press enter.
68+
##### Keyboard
5469

5570
```JavaScript
71+
// Type "Hello World" then press enter.
72+
5673
var robot = require("robotjs");
5774

5875
//Type "Hello World".
@@ -61,9 +78,12 @@ robot.typeString("Hello World");
6178
//Press enter.
6279
robot.keyTap("enter");
6380
```
64-
Get pixel color under the mouse.
81+
82+
##### Screen
6583

6684
```JavaScript
85+
// Get pixel color under the mouse.
86+
6787
var robot = require("robotjs");
6888

6989
//Get mouse position.
@@ -73,9 +93,10 @@ var mouse = robot.getMousePos();
7393
var hex = robot.getPixelColor(mouse.x, mouse.y);
7494
console.log("#" + hex + " at x:" + mouse.x + " y:" + mouse.y);
7595
```
76-
7796
Read the [Wiki](https://github.com/octalmage/robotjs/wiki) for more information!
7897

98+
## (API)[https://github.com/octalmage/robotjs/wiki/Syntax]
99+
79100
## Building
80101

81102
node-gyp is required to build RobotJS.

0 commit comments

Comments
 (0)