File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ If you need to build RobotJS, see the [building](#building) section. Instruction
44
44
<p align =" center " ><img src =" https://cldup.com/lugVjjAkEi.gif " ></p >
45
45
46
46
``` JavaScript
47
- // Move the mouse across the screen as a sine wave.
47
+ // Move the mouse across the screen as a sine wave.
48
48
var robot = require (" robotjs" );
49
49
50
- // Speed up the mouse.
50
+ // Speed up the mouse.
51
51
robot .setMouseDelay (2 );
52
52
53
53
var twoPI = Math .PI * 2.0 ;
@@ -65,26 +65,26 @@ for (var x = 0; x < width; x++)
65
65
##### [ Keyboard] ( https://github.com/octalmage/robotjs/wiki/Syntax#keyboard )
66
66
67
67
``` JavaScript
68
- // Type "Hello World" then press enter.
68
+ // Type "Hello World" then press enter.
69
69
var robot = require (" robotjs" );
70
70
71
- // Type "Hello World".
71
+ // Type "Hello World".
72
72
robot .typeString (" Hello World" );
73
73
74
- // Press enter.
74
+ // Press enter.
75
75
robot .keyTap (" enter" );
76
76
```
77
77
78
78
##### [ Screen] ( https://github.com/octalmage/robotjs/wiki/Syntax#screen )
79
79
80
80
``` JavaScript
81
- // Get pixel color under the mouse.
81
+ // Get pixel color under the mouse.
82
82
var robot = require (" robotjs" );
83
83
84
- // Get mouse position.
84
+ // Get mouse position.
85
85
var mouse = robot .getMousePos ();
86
86
87
- // Get pixel color in hex format.
87
+ // Get pixel color in hex format.
88
88
var hex = robot .getPixelColor (mouse .x , mouse .y );
89
89
console .log (" #" + hex + " at x:" + mouse .x + " y:" + mouse .y );
90
90
```
You can’t perform that action at this time.
0 commit comments