release 2.0.12 Beta

This commit is contained in:
hyb1996
2017-05-29 20:56:12 +08:00
parent 7c88e578fe
commit 5a79bb577f
13 changed files with 59 additions and 28 deletions

View File

@@ -9,8 +9,8 @@ android {
applicationId "com.stardust.scriptdroid"
minSdkVersion 19
targetSdkVersion 23
versionCode 136
versionName "2.0.12 Alpha3日志版"
versionCode 137
versionName "2.0.12 Beta"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk {

View File

@@ -1,3 +1,3 @@
### requestScreenCapture(\[width, height\])
* width \<Number\> 可选参数
参数width和height用于指定截图的分辨率默认为屏幕宽高。

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

View File

@@ -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{

View File

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

View File

@@ -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{

View File

@@ -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("没有找到");
}

View File

@@ -44,8 +44,6 @@ public class App extends MultiDexApplication {
setUpDebugEnvironment();
init();
registerActivityLifecycleCallback();
Logcat.deleteLogFile();
Logcat.startLogSavingIfNeeded();
}
private void setUpStaticsTool() {