Skip to content

Commit 33f7d82

Browse files
committed
Getting ready for NPM.
1 parent e4ba3c0 commit 33f7d82

File tree

5 files changed

+42
-8
lines changed

5 files changed

+42
-8
lines changed

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
autonode
1+
autojs
22
========
33

44
Node.js GUI Automation.
@@ -12,19 +12,22 @@ node-gyp configure build
1212
Get the mouse location and move it.
1313

1414
```JavaScript
15-
var autonode = require("autonode.node");
15+
var autojs = require("autojs");
1616

1717
//Get the mouse position, retuns an object with x and y.
18-
var mouse=autonode.getMousePos();
18+
var mouse=autojs.getMousePos();
1919
console.log("Mouse is at x:" + mouse.x + " y:" + mouse.y);
2020

2121
//Move the mouse down by 100 pixels.
22-
autonode.moveMouse(mouse.x,mouse.y+100);
22+
autojs.moveMouse(mouse.x,mouse.y+100);
23+
24+
//Left click!
25+
autojs.mouseClick();
2326
```
2427
##Progress##
2528

2629
| Module | Status | Notes |
2730
| ------------- |-------------: | ------- |
28-
| Mouse | 50% | Missing mouse click functions. |
31+
| Mouse | 80% | Can't specify mouse button yet. |
2932
| Keyboard | Not Started | Send keypress, type string. |
3033
| Screen | Not Started | Screenshot, read pixel color, image search. |

binding.gyp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"targets": [
33
{
4-
"target_name": "autonode",
4+
"target_name": "autojs",
55
"conditions": [
66
['OS == "mac"', {
77
'include_dirs': [
@@ -17,7 +17,7 @@
1717
}
1818
]
1919
],
20-
"sources": ["src/autonode.cc", "src/deadbeef_rand.c", "src/mouse.c", "src/screen.c"]
20+
"sources": ["src/autojs.cc", "src/deadbeef_rand.c", "src/mouse.c", "src/screen.c"]
2121
}
2222
]
2323
}

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./build/Release/autojs.node');

package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "autojs",
3+
"version": "0.0.1",
4+
"description": "Node.js GUI Automation.",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"install": "node-gyp rebuild"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/octalmage/autojs.git"
13+
},
14+
"keywords": [
15+
"Automation",
16+
"GUI",
17+
"mouse",
18+
"keyboard",
19+
"screenshot",
20+
"image",
21+
"pixel"
22+
],
23+
"author": "Jason Stallings",
24+
"license": "GPL v2",
25+
"gypfile": true,
26+
"bugs": {
27+
"url": "https://github.com/octalmage/autojs/issues"
28+
},
29+
"homepage": "https://github.com/octalmage/autojs"
30+
}

src/autonode.cc src/autojs.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ void init(Handle<Object> target)
5757
target->Set(String::NewSymbol("mouseClick"),
5858
FunctionTemplate::New(mouseClick)->GetFunction());
5959
}
60-
NODE_MODULE(autonode, init)
60+
NODE_MODULE(autojs, init)

0 commit comments

Comments
 (0)