release 2.0.13 Beta2
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"path":"documentation"
|
||||
},
|
||||
{
|
||||
"title": "EMCAScript教程",
|
||||
"title": "ECMAScript教程",
|
||||
"type": "catalogue"
|
||||
},
|
||||
{
|
||||
@@ -65,7 +65,7 @@
|
||||
"path":"documentation"
|
||||
}
|
||||
],
|
||||
"EMCAScript教程": [
|
||||
"ECMAScript教程": [
|
||||
{
|
||||
"title": "基础",
|
||||
"type": "catalogue"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
### text(文件控件)
|
||||
12
app/src/main/assets/sample/QQ与微信/QQ批量删除好友.js
Normal file
12
app/src/main/assets/sample/QQ与微信/QQ批量删除好友.js
Normal file
@@ -0,0 +1,12 @@
|
||||
"auto";
|
||||
|
||||
launchApp("QQ");
|
||||
|
||||
toast("在好友列表中点谁删谁");
|
||||
|
||||
while(true){
|
||||
while(!click("更多"));
|
||||
while(!click("删除好友"));
|
||||
sleep(300);
|
||||
while(!click("删除好友"));
|
||||
}
|
||||
55
app/src/main/assets/sample/QQ与微信/QQ点赞群成员.js
Normal file
55
app/src/main/assets/sample/QQ与微信/QQ点赞群成员.js
Normal file
@@ -0,0 +1,55 @@
|
||||
"auto";
|
||||
var liked = {};
|
||||
while(true){
|
||||
var list = className("AbsListView").findOne();
|
||||
list.children().each(function(child){
|
||||
if(child.className() != "android.widget.FrameLayout"){
|
||||
return;
|
||||
}
|
||||
if(!isGroupMember(child)){
|
||||
return;
|
||||
}
|
||||
if(isMyself(child)){
|
||||
return;
|
||||
}
|
||||
child.child(0).click();
|
||||
like();
|
||||
while(!click("返回"));
|
||||
while(!click("成员资料"));
|
||||
while(!click("返回"));
|
||||
});
|
||||
className("AbsListView").findOne().scrollForward();
|
||||
}
|
||||
|
||||
|
||||
function isGroupMember(child){
|
||||
if(child.childCount() != 1){
|
||||
return false;
|
||||
}
|
||||
return child.child(0) && child.child(0).className() == "android.widget.FrameLayout";
|
||||
}
|
||||
|
||||
function isMyself(child){
|
||||
var l = child.findByText("我");
|
||||
return l && l.size() > 0;
|
||||
}
|
||||
|
||||
function like(){
|
||||
var qq = getQQ();
|
||||
if(liked[qq]){
|
||||
while(!click("返回"));
|
||||
return;
|
||||
}
|
||||
while(!click("更多"));
|
||||
while(!click("查看个人资料卡"));
|
||||
var likeBtn = descEndsWith("点击可赞").findOne();
|
||||
for(let i = 0; i < 10; i++){
|
||||
likeBtn.click();
|
||||
sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
function getQQ(){
|
||||
var qq = textMatches("\\d{5,12}").findOne().text();
|
||||
return qq;
|
||||
}
|
||||
32
app/src/main/assets/sample/QQ与微信/QQ顺序点赞脚本.js
Normal file
32
app/src/main/assets/sample/QQ与微信/QQ顺序点赞脚本.js
Normal file
@@ -0,0 +1,32 @@
|
||||
"auto";
|
||||
|
||||
var 延迟 = 200;
|
||||
|
||||
function 下滑(){
|
||||
className("AbsListView").scrollable().scrollForward();
|
||||
}
|
||||
|
||||
function 赞(){
|
||||
className("ImageView").desc("赞").untilFind()
|
||||
.each(function(item){
|
||||
for(var i = 0; i < 10; i++){
|
||||
item.click();
|
||||
sleep(延迟);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function 显示更多(){
|
||||
for(let i = 0; i < 2;i++){
|
||||
click("显示更多");
|
||||
}
|
||||
}
|
||||
|
||||
toast("请打开自己的资料页,点击点赞图标");
|
||||
sleep(1000);
|
||||
|
||||
while(notStopped()){
|
||||
赞();
|
||||
显示更多();
|
||||
下滑();
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import io.mattcarroll.hover.HoverMenu;
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.Set;
|
||||
|
||||
import io.mattcarroll.hover.NavigatorContent;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/3/11.
|
||||
*/
|
||||
@@ -46,7 +47,7 @@ public class HoverMenuAdapter implements io.mattcarroll.hover.HoverMenuAdapter {
|
||||
private final Context mContext;
|
||||
private final List<String> mTabIds;
|
||||
private final Map<String, NavigatorContent> mData = new LinkedHashMap<>();
|
||||
private final Set<ContentChangeListener> mContentChangeListeners = new HashSet<>();
|
||||
private final Set<io.mattcarroll.hover.HoverMenuAdapter.ContentChangeListener> mContentChangeListeners = new HashSet<>();
|
||||
private View[] mViews;
|
||||
|
||||
public HoverMenuAdapter(@NonNull HoverMenuService context) {
|
||||
|
||||
@@ -112,6 +112,7 @@ public class HoverMenuService extends Service {
|
||||
mWindowHoverMenu.hide();
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,7 @@ public class FireSettingReceiver extends AbstractPluginSettingReceiver {
|
||||
|
||||
@Override
|
||||
protected void firePluginSetting(@NonNull Context context, @NonNull Bundle bundle) {
|
||||
context.startService(new Intent(context, ScriptExecutionIntentService.class)
|
||||
context.startActivity(new Intent(context, RunIntentActivity.class)
|
||||
.putExtras(bundle));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,10 @@ import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import com.afollestad.materialdialogs.DialogAction;
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
import com.stardust.app.Fragment;
|
||||
import com.stardust.scriptdroid.App;
|
||||
import com.stardust.scriptdroid.Pref;
|
||||
import com.stardust.scriptdroid.R;
|
||||
@@ -82,7 +78,7 @@ public class SideMenuFragment extends android.support.v4.app.Fragment {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final boolean checked = AccessibilityService.isEnable(App.getApp());
|
||||
final boolean checked = AccessibilityService.isEnabled(App.getApp());
|
||||
mAccessibilityServiceSwitch.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -114,7 +110,7 @@ public class SideMenuFragment extends android.support.v4.app.Fragment {
|
||||
|
||||
@CheckedChange(R.id.sw_auto_operate_service)
|
||||
void setAutoOperateServiceEnable(CompoundButton button, boolean enable) {
|
||||
boolean isAccessibilityServiceEnabled = AccessibilityService.isEnable(App.getApp());
|
||||
boolean isAccessibilityServiceEnabled = AccessibilityService.isEnabled(App.getApp());
|
||||
if (enable && !isAccessibilityServiceEnabled) {
|
||||
AccessibilityServiceTool.enableAccessibilityService();
|
||||
} else if (!enable && isAccessibilityServiceEnabled) {
|
||||
|
||||
@@ -49,8 +49,6 @@ public class MyScriptListFragment extends Fragment {
|
||||
private MaterialDialog mScriptFileOperationDialog;
|
||||
private MaterialDialog mDirectoryOperationDialog;
|
||||
private ScriptFile mSelectedScriptFile;
|
||||
private MaterialDialog.InputCallback mFileNameInputCallback = new InputCallback(false);
|
||||
private MaterialDialog.InputCallback mDirectoryNameInputCallback = new InputCallback(true);
|
||||
private String mFilePathToImport;
|
||||
|
||||
@Nullable
|
||||
@@ -186,7 +184,7 @@ public class MyScriptListFragment extends Fragment {
|
||||
|
||||
|
||||
public void newDirectory() {
|
||||
showNameInputDialog("", mDirectoryNameInputCallback, new MaterialDialog.InputCallback() {
|
||||
showNameInputDialog("", new InputCallback(true), new MaterialDialog.InputCallback() {
|
||||
@Override
|
||||
public void onInput(@NonNull MaterialDialog dialog, CharSequence input) {
|
||||
if (new ScriptFile(getCurrentDirectory(), input.toString()).mkdirs()) {
|
||||
@@ -204,7 +202,7 @@ public class MyScriptListFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void showFileNameInputDialog(String prefix, final MaterialDialog.InputCallback callback) {
|
||||
showNameInputDialog(prefix, mFileNameInputCallback, callback);
|
||||
showNameInputDialog(prefix, new InputCallback(false), callback);
|
||||
}
|
||||
|
||||
private void showNameInputDialog(String prefix, MaterialDialog.InputCallback textWatcher, final MaterialDialog.InputCallback callback) {
|
||||
@@ -334,6 +332,7 @@ public class MyScriptListFragment extends Fragment {
|
||||
|
||||
private boolean mIsDirectory = false;
|
||||
private String mExcluded;
|
||||
private boolean mIsFirstTextChanged = true;
|
||||
|
||||
InputCallback(boolean isDirectory, String excluded) {
|
||||
mIsDirectory = isDirectory;
|
||||
@@ -346,6 +345,10 @@ public class MyScriptListFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onInput(@NonNull MaterialDialog dialog, CharSequence input) {
|
||||
if (mIsFirstTextChanged) {
|
||||
mIsFirstTextChanged = false;
|
||||
return;
|
||||
}
|
||||
EditText editText = dialog.getInputEditText();
|
||||
if (editText == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user