Update virtualinput.js

This commit is contained in:
Namhyeon Go 2021-06-23 06:51:48 +09:00 committed by GitHub
parent 298a5d15d2
commit eacecd580b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
};