mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Update virtualinput.js
This commit is contained in:
parent
298a5d15d2
commit
eacecd580b
|
@ -9,11 +9,11 @@ var VirtualInputObject = function() {
|
|||
this.create = function() {
|
||||
try {
|
||||
this.oShell = CreateObject("WScript.Shell");
|
||||
this.oAutoIt = CreateObject("AutoItX.Control");
|
||||
this.oAutoIt = CreateObject("AutoItX3.Control");
|
||||
} catch (e) {
|
||||
console.error("VirtualInputObject.create() -> " + e.message);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
this.moveMouse = function(x, y) {
|
||||
this.oAutoIt.MouseMove(x, y);
|
||||
|
@ -26,6 +26,14 @@ var VirtualInputObject = function() {
|
|||
this.create();
|
||||
};
|
||||
|
||||
exports.VERSIONINFO = "VirtualInput Lib (virtualinput.js) version 0.1";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
||||
exports.create = function() {
|
||||
return new VirtualInputObject();
|
||||
};
|
||||
|
||||
exports.moveMouse = function(x, y) {
|
||||
return (new VirtualInputObject()).moveMouse(x, y);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user