mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 06:01:04 +00:00
Update lib/toolkit.js, lib/chrome.js
This commit is contained in:
parent
4bc9669195
commit
255f9dab32
|
@ -10,6 +10,7 @@ var FILE = require("lib/file");
|
||||||
var HTTP = require("lib/http");
|
var HTTP = require("lib/http");
|
||||||
var Websocket = require("lib/websocket");
|
var Websocket = require("lib/websocket");
|
||||||
var AutoIt = require("lib/autoit");
|
var AutoIt = require("lib/autoit");
|
||||||
|
var ToolKit = require("lib/toolkit");
|
||||||
|
|
||||||
// for remote debugging
|
// for remote debugging
|
||||||
var pageEventId = 0;
|
var pageEventId = 0;
|
||||||
|
@ -41,6 +42,7 @@ var ChromeObject = function(interfaces) {
|
||||||
|
|
||||||
// dependencies
|
// dependencies
|
||||||
this.oAutoIt = null;
|
this.oAutoIt = null;
|
||||||
|
this.oToolkit = null;
|
||||||
|
|
||||||
// for remote debugging
|
// for remote debugging
|
||||||
this.debuggingPort = 0;
|
this.debuggingPort = 0;
|
||||||
|
@ -55,6 +57,7 @@ var ChromeObject = function(interfaces) {
|
||||||
|
|
||||||
this.create = function() {
|
this.create = function() {
|
||||||
this.oAutoIt = AutoIt.create();
|
this.oAutoIt = AutoIt.create();
|
||||||
|
this.oToolkit = ToolKit.create();
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1171,6 +1174,10 @@ var ChromeObject = function(interfaces) {
|
||||||
this.oAutoIt.callFunction("MouseClick", ["left"]);
|
this.oAutoIt.callFunction("MouseClick", ["left"]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.vMouseClick = function(x, y) {
|
||||||
|
this.oToolkit.sendClick(this.pageId.substring(0, 6), x, y, 1);
|
||||||
|
};
|
||||||
|
|
||||||
this.mouseWheelUp = function() {
|
this.mouseWheelUp = function() {
|
||||||
this.oAutoIt.callFunction("MouseWheel", ["up"]);
|
this.oAutoIt.callFunction("MouseWheel", ["up"]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -10,7 +10,7 @@ var ToolkitObject = function() {
|
||||||
this.interface = CreateObject("WelsonJS.Toolkit");
|
this.interface = CreateObject("WelsonJS.Toolkit");
|
||||||
return this;
|
return this;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("ToolkitObject.create() ->", e.message);
|
console.warn("WelsonJS.Toolkit is disabled");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user