Skip to content

Commit

Permalink
Add spaces before comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Oct 9, 2016
1 parent b4adaaa commit a9e12ed
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ If you need to build RobotJS, see the [building](#building) section. Instruction
<p align="center"><img src="https://cldup.com/lugVjjAkEi.gif"></p>

```JavaScript
//Move the mouse across the screen as a sine wave.
// Move the mouse across the screen as a sine wave.
var robot = require("robotjs");

//Speed up the mouse.
// Speed up the mouse.
robot.setMouseDelay(2);

var twoPI = Math.PI * 2.0;
Expand All @@ -65,26 +65,26 @@ for (var x = 0; x < width; x++)
##### [Keyboard](https://github.com/octalmage/robotjs/wiki/Syntax#keyboard)

```JavaScript
//Type "Hello World" then press enter.
// Type "Hello World" then press enter.
var robot = require("robotjs");

//Type "Hello World".
// Type "Hello World".
robot.typeString("Hello World");

//Press enter.
// Press enter.
robot.keyTap("enter");
```

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

```JavaScript
//Get pixel color under the mouse.
// Get pixel color under the mouse.
var robot = require("robotjs");

//Get mouse position.
// Get mouse position.
var mouse = robot.getMousePos();

//Get pixel color in hex format.
// Get pixel color in hex format.
var hex = robot.getPixelColor(mouse.x, mouse.y);
console.log("#" + hex + " at x:" + mouse.x + " y:" + mouse.y);
```
Expand Down

0 comments on commit a9e12ed

Please sign in to comment.