neoarc / namacrojs Goto Github PK
View Code? Open in Web Editor NEWScripting MS-Windows using JavaScript
Scripting MS-Windows using JavaScript
imageToText API needed.
ex)
var img = system.screen.capture(0,0,500,500);
var txt = imageToText(img);
trace(txt); // -> text ๐
ex)
// Mouse.lbuttonDown = static constant
system.mouse.on(Mouse.lbuttondown, function() {
alert("catched lbuttondown");
});
// Mouse.allAction = lbuttonDown | lbuttonUp | move | ...
system.mouse.on(Mouse.allAction, funcnction() {
alert("catched action: " + foobar);
});
system.screen cannot support multi monitor.
how to make support it and more easily accessible?
Recording result example:
(pseudo example)
// target window = notepad
// var w = ...
system.mouse.click(w.x + 5, w.y + 5);
Recording mode needed
[Save result as clipboard] has many problems....
When idle process, run GC needed.
We must get return code from external process..
ex)
var ret = system.execute("notepad.exe");
if (ret == -1) alert("fail!!");
Updater does: Download files -> extract -> Update
This issue contains also:
Make all files to one executable file.
(exe, bin, dll, js) to (exe)
Need exit code for integrate external programs..
ex)
exit(0);
exit(-1);
Exit method does not terminate NaMacro exactly.
ex)
exit();
alert("f**k!!");
To appointment macro-file.
for example:
NaMacro.exe ---> Run default script (NaMacro.js)
NaMacro.exe aaa.js ---> Run aaa.js
Cannot build release mode.
Must fix this.
var mouse = system.mouse;
mouse.move(1,1);
mouse.click();
mouse.lbuttonDown();
Separated git:
https://github.com/neoarc/NaLib
Change NaLib to External link(?) ..
Integrating with Twitter API
To check 'check point' of script, tagging hotkey needed.
for recorded output example
system.mouse.move(1,1);
//-- tagged -- 2016.03.31 pm 08:32 ---
system.mouse.move(1,2);
ex)
// main.js
include("aa.js");
include("bb.js");
// aa.js
include("bb.js");
// in this case, bb.js loaded twice.
// Must check fullpath.
ex)
print(typeof WrapObj); // --> [object Wrap]
ex)
windowObj.highlight(); // highlight window boundary
highlight(0, 0, 100, 100); // screen coord
Global hotkey for begin or terminate script or etc.
var result = img.compare(img2);
if (result == 0) {
// same!
}
Installer needed
Create image from file:
ex)
var img = new Image("D:...\Hello.png");
print(img.width + "x" + img.height);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.