Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hyb1996 committed Aug 16, 2017
1 parent 7b1a5fc commit 8dd93e5
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 18 deletions.
33 changes: 28 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# AutoJs
# Auto.js
## 简介
一个**不需要Root权限**的类似按键精灵的自动操作软件,可以实现自动点击、滑动、输入文字、打开应用等。
一个主要由无障碍服务实现的**不需要Root权限**的类似按键精灵的自动操作软件,可以实现自动点击、滑动、输入文字、打开应用等。

同时有[Sublime Text 插件](https://github.com/hyb1996/AutoJs-Sublime-Plugin)可提供基础的在桌面开发的功能。

下载地址:[酷安](http://www.coolapk.com/apk/com.stardust.scriptdroid)

特性:
### 特性
* 简单易用的自动操作函数
* 悬浮窗录制和运行
* 丰富的文档、教程与示例
* 更专业&强大的选择器API,提供对屏幕上的控件的寻找、遍历、获取信息、操作等。类似于Google的UI测试框架UiAutomator,您也可以把他当做移动版UI测试框架使用
* 采用JavaScript为脚本语言,支持简单的代码补全。您也可以把他当作简便的JavaScript IDE使用
* 带有界面分析工具,类似Android Studio的LayoutInspector,可以分析界面层次和范围、获取界面上的控件信息
* 支持使用Root权限以提供更强大的屏幕点击、滑动、录制功能和运行shell命令
* 支持使用Root权限以提供更强大的屏幕点击、滑动、录制功能和运行shell命令。录制录制可产生js文件或二进制文件,录制动作的回放比较流畅
* 提供截取屏幕、保存截图、图片找色等函数,可进行简单的游戏脚本制作;未来将加入找图功能
* 与Python类似的文件处理API,以及更多日常工具函数
* 可以用e4x编写简单的界面,并且未来将加入打包为独立应用功能,可用于制作简单的应用

### 文档
可在[这里](https://github.com/hyb1996/NoRootScriptDroid/tree/master/app/src/main/assets/help/documentation)查看在线文档,或者在应用内帮助页面查看。

目前文档不是很完善。

### 示例
可在[这里](https://github.com/hyb1996/NoRootScriptDroid/tree/master/app/src/main/assets/sample)查看一些示例,或者直接在应用内查看和运行。

### 截图

![screen-capture1](https://raw.githubusercontent.com/hyb1996/NoRootScriptDroid/master/screen-captures/ss01.png)

Expand All @@ -27,6 +39,17 @@

![screen-capture5](https://raw.githubusercontent.com/hyb1996/NoRootScriptDroid/master/screen-captures/ss06.png)

### Todo

* 脚本社区或脚本市场
* 更方便地悬浮窗编辑、运行脚本
* 更方便地脚本编辑,在编辑器界面可搜索、查看函数
* 智能生成选择器代码
* 更详细的文档和向导(Developer Guide)
* 全新的脚本
* 找图功能
* 脚本打包为独立应用功能

## License
基于[Mozilla Public License Version 2.0](https://github.com/hyb1996/NoRootScriptDroid/blob/master/LICENSE.md)并附加以下条款:
* **非商业性使用** — 不得将此项目及其衍生的项目的源代码和二进制产品用于任何商业和盈利用途
7 changes: 3 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.stardust.scriptdroid"
minSdkVersion 17
targetSdkVersion 23
versionCode 162
versionName "2.0.16 Beta2"
versionCode 163
versionName "2.0.16 Beta2.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk {
Expand Down Expand Up @@ -116,7 +116,6 @@ dependencies {
compile 'io.mattcarroll.hover:hover:0.9.7'
compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
compile 'com.ashokvarma.android:bottom-navigation-bar:2.0.1'
compile 'com.wang.avi:library:2.1.3'
compile "io.reactivex.rxjava2:rxjava:2.1.0"
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
Expand All @@ -126,7 +125,7 @@ dependencies {
compile 'com.android.volley:volley:1.0.0'
compile 'com.flurry.android:analytics:7.0.0@aar'
compile 'com.pushtorefresh.storio:sqlite:1.12.3'
// 920 Text Editor
// 920 Text Editors
compile 'com.afollestad.material-dialogs:commons:0.9.2.3'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.rengwuxian.materialedittext:library:2.0.3'
Expand Down
1 change: 0 additions & 1 deletion app/src/main/assets/sample/定时器/定时执行.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ setInterval(function(){
toast(i * 5 + "秒");
}, 5000);

loop();
1 change: 0 additions & 1 deletion app/src/main/assets/sample/定时器/循环执行.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ setInterval(function(){
}
}, 4000);

loop();
16 changes: 14 additions & 2 deletions app/src/main/res/raw/licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>StorIO </name>
<name>StorIO</name>
<url>https://github.com/pushtorefresh/storio</url>
<license>Apache Software License 2.0</license>
</notice>
Expand Down Expand Up @@ -85,7 +85,7 @@
</notice>
<notice>
<name>Expandable RecyclerView</name>
<copyright>Copyright (c) 2014 Big Nerd Ranch</copyright>
<copyright>Copyright (c) 2015 Big Nerd Ranch</copyright>
<url>https://github.com/bignerdranch/expandable-recycler-view</url>
<license>MIT License</license>
</notice>
Expand All @@ -107,4 +107,16 @@
<url>https://github.com/google/volley</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>Settings Compat</name>
<copyright>Copyright 2016 czy1121</copyright>
<url>https://github.com/czy1121/settingscompat</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>Zip4j</name>
<copyright/>
<url>http://www.lingala.net/zip4j/</url>
<license>Apache Software License 2.0</license>
</notice>
</notices>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<string-array name="ad_showing_mode_keys">
<item>默认</item>
<item>每天显示一次</item>
<item>关闭广告(╥﹏╥)</item>
<item>关闭广告</item>
</string-array>

<string-array name="ad_showing_mode_values">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ public class Loopers {
public volatile boolean waitWhenIdle = false;
private volatile Looper mServantLooper;
private static volatile ConcurrentHashMap<Thread, Looper> sLoopers = new ConcurrentHashMap<>();
private static Field MESSAGE_QUEUE_MESSAGE;
private Timers mTimers;
private MessageQueue mMessageQueue;

public Loopers(Timers timers) {
mTimers = timers;
if (Looper.myLooper() == Looper.getMainLooper()) {
waitWhenIdle = true;
}
mMessageQueue = Looper.myQueue();
mMessageQueue.addIdleHandler(new MessageQueue.IdleHandler() {
Looper.myQueue().addIdleHandler(new MessageQueue.IdleHandler() {
@Override
public boolean queueIdle() {
Looper l = Looper.myLooper();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private boolean clearCallback(int id) {


public boolean hasPendingCallback() {

return mFutureCallbackUptimeMillis > SystemClock.uptimeMillis();
}
}

0 comments on commit 8dd93e5

Please sign in to comment.