个人简介
👨🏻💻个人主页:九黎aj
🏃🏻♂️幸福源自奋斗,平凡造就不凡
🌟如果文章对你有用,麻烦关注点赞收藏走一波,感谢支持!
🌱欢迎订阅我的专栏:autojs
python
🌟 QQ群:698307198普通交流群698307198欢迎加入赞助v群, 和各位大神一同交流
免责声明:本博客提供的所有内容仅供学习、分享与交流,我们不保证内容的正确性。通过使用本博客内容随之而来的问题与本博客无关。当使用本博客代码时,代表你已接受本博客的免责声明
前言
源码分享,文章内容有限.更多内容可加群获取 QQ群
698307198
正文
"ui";
importClass("android.widget.VideoView")
importClass("android.media.MediaPlayer")
show();
function show() {
ui.layout(
<frame>
<vertical elevation="999" padding="20sp">
<vertical >
<vertical padding="16">
<text textSize="30sp" textColor="#ff0000" gravity="center">登录系统</text>
</vertical>
<vertical h="auto" align="center" margin="0 50">
<linear>
<card w="*" h="250" margin="0" cardCornerRadius="15dp" cardElevation="15dp" gravity="bottom" alpha="0.5">
<vertical gravity="center_vertical">
<text id="t1" size="10" color="#dd000000" marginTop="30" paddingLeft="20"/>
<input id="dlzh" w="*" marginRight="30" marginLeft="30" singleLine="true" hint="账号" textColorHint="#dd000000"/>
<text id="t2" size="10" color="#dd000000" marginTop="10" paddingLeft="35"/>
<input id="dlmm" w="*" marginRight="30" marginLeft="30" singleLine="true" hint="密码" textColorHint="#dd000000" password="true"/>
<horizontal>
<button id="login" style="Widget.AppCompat.Button.Colored" layout_weight="1" gravity="center">登陆</button>
<button id="zc" style="Widget.AppCompat.Button.Colored" layout_weight="1" gravity="center">注册</button>
<button id="jrql" style="Widget.AppCompat.Button.Colored" layout_weight="1" gravity="center">加群</button>
<button id="buy" style="Widget.AppCompat.Button.Colored" layout_weight="1" gravity="center" >买卡密</button>
<button id="cz" style="Widget.AppCompat.Button.Colored" layout_weight="1"gravity="center">充值</button>
</horizontal>
</vertical>
</card>
</linear>
</vertical>
</vertical>
</vertical>
<android.widget.VideoView gravity="center" h="*" id="vd"/>
</frame>
);
视频地址 可以是网页链接 也可以是本地文件地址
ui.vd.setVideoPath("/storage/emulated/0/2.mp4")
ui.vd.start()
threads.start(function() {
sleep(10000)
while (true)
if (!ui.vd.isPlaying()) {
ui.vd.start()
sleep(10000);
}
})
}
声明
部分内容来自网络
本教程仅用于学习, 禁止用于其他用途
文章内容有限.完整内容可加群获取 QQ群
698307198
具体操作
其他
参考文章
文中涉及到的连接.和v群的开发者交流做为参考
声明
部分内容来自网络
本教程仅用于学习, 禁止用于其他用途
QQ群
698307198
扫一扫二维码,加入群聊
说明:
本文提供的代码仅供参考。
有些地方可能在最新版本的Auto.js上面需要做修改,才能运行的.如果不理解,可以加群询问.
Auto.js简介
Auto.js是利用安卓系统的“辅助功能”实现类似于按键精灵,触摸精灵.懒人精灵等一样,可以通过代码模拟一系列界面动作的辅助工作。
而与“按键精灵”不同的是,它的模拟动作并不是简单的使用在界面定坐标点来实现,而是类似与win一般,找窗口句柄来实现的。通过控件点击可以实现全分辨率的模拟人工点击效果
Auto.js使用JavaScript作为脚本语言,目前使用Rhino作为脚本引擎,支持ES5与部分ES6特性。新的autojs pro9系列可以使用node.js开发
开发文档
进群下载
为什么要使用Auto.js Pro开发脚本,有什么特点?
吸引我使用Auto.js Pro的原因有很多。最主要的几个原因是:
- Auto.js Pro能开发免ROOT的安卓脚本 Auto.js Pro基于节点操作,能开发全分辨率的脚本,自动适配各种安卓机型
- 可以使用手机开发,这使得开发者更多,有更多代码可以参考学习.在此也欢迎加入九黎的赞助vip群,目前已经收集或者开发了大概4000余代码,覆盖各个分类.包含autojs教程视频,易语言,按键精灵,aj,python大量源码
- Auto.js Pro丰富的UI组件,能自定义各种样式的安卓界面 Auto.js.并且可以使用原生xml
- Pro使用的javascript的语法比较优雅,代码可读性强 Auto.js Pro的命令库非常的丰富,接口比较多 Auto.js
- Pro脚本文件体积比较小。1000行的代码,打包后的apk文件只有3-5M,还没有广告