Skip to content

Commit

Permalink
Getting ready for NPM.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Sep 1, 2014
1 parent e4ba3c0 commit 33f7d82
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
13 changes: 8 additions & 5 deletions README.md
@@ -1,4 +1,4 @@
autonode
autojs
========

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

```JavaScript
var autonode = require("autonode.node");
var autojs = require("autojs");

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

//Move the mouse down by 100 pixels.
autonode.moveMouse(mouse.x,mouse.y+100);
autojs.moveMouse(mouse.x,mouse.y+100);

//Left click!
autojs.mouseClick();
```
##Progress##

| Module | Status | Notes |
| ------------- |-------------: | ------- |
| Mouse | 50% | Missing mouse click functions. |
| Mouse | 80% | Can't specify mouse button yet. |
| Keyboard | Not Started | Send keypress, type string. |
| Screen | Not Started | Screenshot, read pixel color, image search. |
4 changes: 2 additions & 2 deletions binding.gyp
@@ -1,7 +1,7 @@
{
"targets": [
{
"target_name": "autonode",
"target_name": "autojs",
"conditions": [
['OS == "mac"', {
'include_dirs': [
Expand All @@ -17,7 +17,7 @@
}
]
],
"sources": ["src/autonode.cc", "src/deadbeef_rand.c", "src/mouse.c", "src/screen.c"]
"sources": ["src/autojs.cc", "src/deadbeef_rand.c", "src/mouse.c", "src/screen.c"]
}
]
}
1 change: 1 addition & 0 deletions index.js
@@ -0,0 +1 @@
module.exports = require('./build/Release/autojs.node');
30 changes: 30 additions & 0 deletions package.json
@@ -0,0 +1,30 @@
{
"name": "autojs",
"version": "0.0.1",
"description": "Node.js GUI Automation.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"install": "node-gyp rebuild"
},
"repository": {
"type": "git",
"url": "https://github.com/octalmage/autojs.git"
},
"keywords": [
"Automation",
"GUI",
"mouse",
"keyboard",
"screenshot",
"image",
"pixel"
],
"author": "Jason Stallings",
"license": "GPL v2",
"gypfile": true,
"bugs": {
"url": "https://github.com/octalmage/autojs/issues"
},
"homepage": "https://github.com/octalmage/autojs"
}
2 changes: 1 addition & 1 deletion src/autonode.cc → src/autojs.cc
Expand Up @@ -57,4 +57,4 @@ void init(Handle<Object> target)
target->Set(String::NewSymbol("mouseClick"),
FunctionTemplate::New(mouseClick)->GetFunction());
}
NODE_MODULE(autonode, init)
NODE_MODULE(autojs, init)

0 comments on commit 33f7d82

Please sign in to comment.