"ui";
importClass(android.content.Intent);
importClass(android.net.Uri);
importClass(java.io.File);
context_DayOrNight = 1;
activity.window.addFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
context_LogomarginTop = "0"
function enableAbs() {
importClass(android.content.Context);
importClass(android.provider.Settings);
var packageName = context.getPackageName();
var absPermittedByshell = false;
try {
var enabledServices = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
log('当前已启用的辅助服务\n', enabledServices);
if (enabledServices.indexOf(packageName) >= 0 && auto.service != null) {
log("已经开启无障碍服务,无需重复开启");
} else {
var Services = enabledServices + ":" + packageName + "/com.stardust.autojs.core.accessibility.AccessibilityService";
Settings.Secure.putString(context.getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, Services);
Settings.Secure.putString(context.getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, '1');
log("成功开启无障碍服务");
}
return true
} catch (error) {
if (absPermittedByshell == false && shell("pm grant " + packageName + " android.permission.WRITE_SECURE_SETTINGS", true).code == 0) {
log("已成功使用shell开启无障碍服务授权");
absPermittedByshell = true;
return this.enableAbs()
} else {
if (absPermittedByshell == true) {
log("shell开启授权成功,但仍然无法顺利开启无障碍服务,请手动开启!");
return false;
} else {
log("使用shell开启授权失败");
return false
}
}
log("使用Shell开启无障碍失败,错误:" + error);
}
}
function clacAspectRatio(fromWidth, fromHeight, toWidthOrHeight, isWidth) {
if (isWidth == true) {
return fromHeight * (toWidthOrHeight / fromWidth);
} else {
return fromWidth * (toWidthOrHeight / fromHeight);
}
}
function setDayMode() {
context_framebg = "#FFFFFF" //全局背景
context_textColor = "#000000" //文字颜色
context_textBg = "#FAFAFA" //文字背景
context_Fgx = "#EEEEEE" //分割线颜色
context_TBbgColor = "FF5722" //淘宝背景颜色
context_PDDbgColor = "FF1744" //拼多多背景颜色
context_WBbgColor = "FF8F00" //微博背景颜色
context_WXbgColor = "4CAF50" //微信背景颜色
context_QQbgColor = "2196F3" //QQ背景颜色
context_JDbgColor = "F44336" //京东背景颜色
context_WMbgColor = "FD7034" //完美校园背景颜色
context_JBScolor = "FAFAFA"
context_SettingsCard = "#F5F5F5" //设置卡片颜色
context_LogomarginTop = getStorageData("DayUi", "LogomarginTop");
context_SunMoon = "@drawable/ic_wb_sunny_black_48dp"; //☀️
context_Logo = getStorageData('APPbasic', 'URLprefix') + "/OrangeJs_logo.png";
context_TopPics = getStorageData("DayUiPicture", "TopPics");
context_TopPics_Copyright = getStorageData("DayUiPicture", "TopPicsCopyright");
context_BottomPics = getStorageData("DayUiPicture", "BottomPics");
context_BottomPics_Copyright = getStorageData("DayUiPicture", "BottomPicsCopyright");
if (context_TopPics == undefined) {
context_TopPics = "http://www.google.com";
}
if (context_BottomPics == undefined) {
context_BottomPics = "http://www.google.com"
}
if (context_TopPics.search("file://") == 0 && images.read(context_TopPics.replace("file://", "")) != null) {
let img = images.read(context_TopPics.replace("file://", ""));
imgWidth = img.getWidth();
imgHeight = img.getHeight();
context_TopPics_width = device.width;
context_TopPics_height = Math.round(clacAspectRatio(imgWidth, imgHeight, context_TopPics_width, true));
} else {
context_TopPics_width = 0;
context_TopPics_height = 0;
}
if (context_BottomPics.search("file://") == 0 && images.read(context_BottomPics.replace("file://", "")) != null) {
let img = images.read(context_BottomPics.replace("file://", ""));
imgWidth = img.getWidth();
imgHeight = img.getHeight();
context_BottomPics_width = device.width;
context_BottomPics_height = Math.round(clacAspectRatio(imgWidth, imgHeight, context_BottomPics_width, true));
} else {
context_BottomPics_width = 0;
context_BottomPics_height = 0;
}
}
function setNightMode() {
context_framebg = "#000000"; //全局背景
context_textColor = "#FFFFFF" //文字颜色
context_textBg = "#000000" //文字背景
context_Fgx = "#50EEEEEE" //分割线颜色
context_TBbgColor = "000000" //淘宝背景颜色
context_PDDbgColor = "000000" //拼多多背景颜色
context_WBbgColor = "000000" //微博背景颜色
context_WXbgColor = "000000" //微信背景颜色
context_QQbgColor = "000000" //QQ背景颜色
context_JDbgColor = "000000" //京东背景颜色
context_WMbgColor = "000000" //完美校园背景颜色
context_JBScolor = "000000"
context_SettingsCard = "#616161"
context_LogomarginTop = getStorageData("NightUi", "LogomarginTop");
context_SunMoon = "@drawable/ic_brightness_2_black_48dp" //🌙
context_Logo = getStorageData('APPbasic', 'URLprefix') + "/OrangeJs-logoWhite.png" //白色Logo
context_TopPics = getStorageData("NightUiPicture", "TopPics");
context_TopPics_Copyright = getStorageData("NightUiPicture", "TopPicsCopyright");
context_BottomPics = getStorageData("NightUiPicture", "BottomPics");
context_BottomPics_Copyright = getStorageData("NightUiPicture", "BottomPicsCopyright");;
if (context_TopPics == undefined) {
context_TopPics = "http://www.google.com";
}
if (context_BottomPics == undefined) {
context_BottomPics = "http://www.google.com"
}
if (context_TopPics.search("file://") == 0 && images.read(context_TopPics.replace("file://", "")) != null) {
let img = images.read(context_TopPics.replace("file://", ""));
imgWidth = img.getWidth();
imgHeight = img.getHeight();
context_TopPics_width = device.width;
context_TopPics_height = Math.round(clacAspectRatio(imgWidth, imgHeight, context_TopPics_width, true));
} else {
context_TopPics_width = 0;
context_TopPics_height = 0;
}
if (context_BottomPics.search("file://") == 0 && images.read(context_BottomPics.replace("file://", "")) != null) {
let img = images.read(context_BottomPics.replace("file://", ""));
imgWidth = img.getWidth();
imgHeight = img.getHeight();
context_BottomPics_width = device.width;
context_BottomPics_height = Math.round(clacAspectRatio(imgWidth, imgHeight, context_BottomPics_width, true));
} else {
context_BottomPics_width = 0;
context_BottomPics_height = 0;
}
}
function WhatNowColor() {
if (getStorageData("DayNightSetting", "AutoDayNight") != undefined) {
var NightTime = getStorageData("DayNightSetting", "NightTime");
var DayTime = getStorageData("DayNightSetting", "DayTime");
var myDate = new Date();
if (Number(NightTime) > Number(DayTime) && myDate.getHours() >= Number(NightTime) || Number(NightTime) > Number(DayTime) && myDate.getHours() < Number(DayTime) || Number(NightTime) < Number(DayTime) && myDate.getHours() >= Number(NightTime) && myDate.getHours() < Number(DayTime)) {
return 0;
} else {
return 1;
}
}
}
if (WhatNowColor() != context_DayOrNight && getStorageData("DayNightSetting", "AutoDayNight") != undefined) {
if (WhatNowColor() == 1) {
context_DayOrNight = 1;
setDayMode();
} else {
con
没有合适的资源?快使用搜索试试~ 我知道了~
使用Auto.js软件制作的脚本合辑.zip

共73个文件
jpg:29个
js:20个
png:16个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 98 浏览量
2023-12-31
00:57:21
上传
评论 1
收藏 12.15MB ZIP 举报
温馨提示
1、该资源内项目代码经过严格调试,下载即用确保可以运行! 2、该资源适合计算机相关专业(如计科、人工智能、大数据、数学、电子信息等)正在做课程设计、期末大作业和毕设项目的学生、或者相关技术学习者作为学习资料参考使用。 3、该资源包括全部源码,需要具备一定基础才能看懂并调试代码。 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip 使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip使用Auto.js软件制作的脚本合辑.zip
资源推荐
资源详情
资源评论





















收起资源包目录
















































































共 73 条
- 1
资源评论



辣椒种子
- 粉丝: 4515
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
