release 2.0.12 Beta
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
### requestScreenCapture(\[width, height\])
|
||||
|
||||
* width \<Number\> 可选参数
|
||||
参数width和height用于指定截图的分辨率,默认为屏幕宽高。
|
||||
11
app/src/main/assets/sample/QQ与微信/微信循环发送图片.js
Normal file
11
app/src/main/assets/sample/QQ与微信/微信循环发送图片.js
Normal file
@@ -0,0 +1,11 @@
|
||||
"auto";
|
||||
while (true) {
|
||||
className("ImageButton").descStartsWith("更多功能按钮").click();
|
||||
while(!click("相册"));
|
||||
sleep(500);
|
||||
className("GridView").findOne().child(1).click();
|
||||
sleep(200);
|
||||
while(!click("发送"));
|
||||
sleep(300);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ var img = captureScreen();
|
||||
toastLog("开始找色");
|
||||
//指定在位置(90, 220)宽高为900*1000的区域找色。
|
||||
//0xff00cc是编辑器的深粉红色字体(字符串)颜色
|
||||
var point = findColorInRegion(img, 0xff00cc, 90, 220, 900, 1000);
|
||||
var point = findColorInRegion(img, "#ff00cc", 90, 220, 900, 1000);
|
||||
if(point){
|
||||
toastLog("x = " + point.x + ", y = " + point.y);
|
||||
}else{
|
||||
|
||||
@@ -7,7 +7,7 @@ var img = captureScreen();
|
||||
toastLog("开始找色");
|
||||
//指定在位置(90, 220)宽高为900*1000的区域找色。
|
||||
//0xff00cc是编辑器的深粉红色字体(字符串)颜色
|
||||
var point = findColor(img, 0xff00cc, {
|
||||
var point = findColor(img, "#ff00cc", {
|
||||
region: [90, 220, 900, 1000],
|
||||
threads: 8
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ launchApp("QQ");
|
||||
sleep(2000);
|
||||
var img = captureScreen();
|
||||
toastLog("开始找色");
|
||||
var point = findColor(img, 0xf64d30);
|
||||
var point = findColor(img, "#f64d30");
|
||||
if(point){
|
||||
toastLog("x = " + point.x + ", y = " + point.y);
|
||||
}else{
|
||||
|
||||
@@ -6,7 +6,7 @@ var img = captureScreen();
|
||||
//0xffffff为白色
|
||||
toastLog("开始找色");
|
||||
var point = findColor(img, 0xffffff, {
|
||||
//指定算法为rgb+,更默认算法rgb更准确,但时间更久
|
||||
//指定算法为rgb+,比默认算法rgb更准确,但时间更久
|
||||
algorithm: "rgb+",
|
||||
//指定颜色临界值为16
|
||||
threshold: 16,
|
||||
@@ -19,4 +19,14 @@ if(point){
|
||||
toastLog("没有找到");
|
||||
}
|
||||
|
||||
|
||||
point = findColor(img, 0xffffff, {
|
||||
//指定算法为颜色差值,比默认算法rgb更快
|
||||
algorithm: "diff",
|
||||
//指定r, b, b分别都在范围ff±20内
|
||||
threshold: 0x202020,
|
||||
});
|
||||
if(point){
|
||||
toastLog("x = " + point.x + ", y = " + point.y);
|
||||
}else{
|
||||
toastLog("没有找到");
|
||||
}
|
||||
|
||||
@@ -44,8 +44,6 @@ public class App extends MultiDexApplication {
|
||||
setUpDebugEnvironment();
|
||||
init();
|
||||
registerActivityLifecycleCallback();
|
||||
Logcat.deleteLogFile();
|
||||
Logcat.startLogSavingIfNeeded();
|
||||
}
|
||||
|
||||
private void setUpStaticsTool() {
|
||||
|
||||
Reference in New Issue
Block a user