真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

怎么用Android4.1.0實現(xiàn)自動閱讀小說

這篇文章主要介紹“怎么用Android4.1.0實現(xiàn)自動閱讀小說”,在日常操作中,相信很多人在怎么用Android4.1.0實現(xiàn)自動閱讀小說問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”怎么用Android4.1.0實現(xiàn)自動閱讀小說”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

為石鼓等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及石鼓網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為成都網(wǎng)站建設(shè)、成都做網(wǎng)站、石鼓網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠(yuǎn)!

"ui";
//#region UI
var rootUrl = "http://114.115.220.1:91";//各位大神小弟自己的服務(wù)器別黑謝謝
var storaySign = "XiaoShuo0412326@163.com";
var woolStorage = storages.create(storaySign);//創(chuàng)建本地存儲
var storyThread = null;
ui.layout(


























































































































































{/* drawer */}












);
//#endregion
//#region 初始化方法
initializeUI();
initializeRightMenu();
initializeHeaderMenu();
initializeData();
initializeEvent();
/**
 * 初始化UI
 */
function initializeUI() {
ui.ToutiaoView.setTitles(["自動刷", "打賞&幫助", "設(shè)備"]);//設(shè)置滑動頁面的標(biāo)題
ui.drawerTabs.setupWithViewPager(ui.ToutiaoView);//讓滑動頁面和標(biāo)簽欄聯(lián)動
activity.setSupportActionBar(ui.toolbar);
activity.window.addFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);//設(shè)置全屏
ui.viewpager.overScrollMode = android.view.View.OVER_SCROLL_NEVER;//刪除滑動到底時的邊緣陰影
//為頁面設(shè)置漸變色背景
ui.firstpage.backgroundDrawable = GradientDrawable("TL_BR", ["#81C784", "#2E7D32", "#2E7D32"]);
ui.secondpage.backgroundDrawable = GradientDrawable("TL_BR", ["#FFF176", "#F9A825", "#F9A825"]);
ui.skip.click(() => ui.viewpager.currentItem = ui.viewpager.childCount - 1);//點擊跳過則跳轉(zhuǎn)到最后一頁
permissionpage = ui.viewpager.childCount - 1 - 1;//授權(quán)頁下標(biāo)(啟動頁前一頁)(啟動頁固定最后一頁)
ui.txtTimeTip.setText("今天是:" + getDate());
ui.adWebview.loadUrl("http://114.115.220.1:91/app/Resources/Images/99個道德經(jīng)的知識.jpg");
/**
     * 邀請碼綁定按鈕點擊事件
     */
ui.recommandList.on("item_bind", function (itemView, itemHolder) {
itemView.btnCopyText.on("click", function () {
let item = itemHolder.item;
toast("復(fù)制成功: " + item.AppCode);
setClip(item.AppCode);
});
});
var items = [
{ AppName: "1、七貓免費(fèi)小說", AppCode: "5K9FRS" },
{ AppName: "2、番茄免費(fèi)小說", AppCode: "782383363" },
{ AppName: "3、免費(fèi)淘小說", AppCode: "A74219742" },
{ AppName: "小米應(yīng)用商店該有的都有", AppCode: "http://app.mi.com" },
];
ui.recommandList.setDataSource(items);
let deviceName = device.device;
let androidVersion = device.release;
let deviceResolution = device.width + "X" + device.height;
let deviceModel = device.model;
let deviceUUID = device.fingerprint;
ui.txtDeviceName.setText("設(shè)備名稱:" + deviceName);
ui.txtDeviceResolution.setText("設(shè)備分辨率:" + deviceResolution + "寬X高");
ui.txtDeviceModel.setText("設(shè)備型號:" + deviceModel);
ui.txtAndroidModel.setText("Android版本:" + androidVersion);
ui.txtDeviceUUID.setText("唯一標(biāo)識碼:" + deviceUUID);
try {
ui.txtDeviceIMEI.setText("設(shè)備IMEI:" + device.getIMEI());
} catch (error) {
ui.txtDeviceIMEI.setText("設(shè)備IMEI:沒有權(quán)限讀取");
}
}
function initializeRightMenu() {
ui.menu.setDataSource([
{ title: "更新日志", icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAC8klEQVRYR82XT2sTQRjGn3cTaG8mG28eqrATEQ8NePIiFRFURCoigohWVOxORNtP0PQTmKKZHEQoRQQtUpQigmjrBxDqRbGzYj140kziLaXpjszalDSm+bOxxDkF8s7z/N5535nZIfR4UI/90RTAFvJpN4Da1zPFW8n5ZhoNAezc5wzIugngdjcAAE4S4UjBZc52Oo0BhPyuONvTpXkwfff9L0ltrY8XeNJtpPcXwMayzyrOZv8FgNGIC7lQ5OxozwBsId8ozo71EGD5teLJ410BxPKf9qLcXwpE+suxkntgpSoYyy2nQLRri8Fq9ENpfF8Qb+flK+WyE10BJIRc1KABQBvRlOJss39sIZcADNYZjCvOsgGAkC8VZ6dCAZjsLKIrAMbqBLIW4flPly22alZbePOKO6dDASSEN6yh6wB881ejKSNi9VWM6SA0JlWaZVoBJIR8UeDsTCiAjSXUBLwrcDb0p6ZeFlrf8VejcVPnViWIC2+uyJ2zoQDsnMyAMBFM1nqMNK1oC9MAYiCaUq4zZsoUtShWa1ApR5c2m1B4zxR3zoUCiN39Gov2V1K+DkwHNkR+EWhkndaWanfDdqWw83JWuex8KIDqJFssT4OsEnxdAmFYcRb0Q7UkWustuyBCmKw2qJ2TT1SaXegKoFmjmTIRIegPM3xCKQJkNwHy3mPlOhd3DKDlLsjLRwWXXQoFkMgtj2jLHECdDb8cnao2YVzImSJnl0MB2EKaI7djANL6aiGdNI0L0z+KJ0dCAXSWd+NoOy8fKpdd6x2A8B4o7twIBWALaS6frTdde8tScxl1AdDolGvHv+4kDL8C7Zi1irG7KUEr8Xb+j+fk+2KaHQrVA+0YNIsxH6SkdR+IDsPCQTXKPtbG7+hnefC+AKDS+zOxe3LIsvwh87s1QF5OQGO07YeJBU0+VXzQGpFfIdBawXXeGqNEXnrrFVy3IliIaGI/0o7XEqAaUM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HADGrZLTvSyQZVuq1h7wQsx4OFlX8q5UBUraVDwc7aYIZS3YOl+smkkhmBBwcEHJUJQujSYFZm8U5H5ozDhusxPy614XSrNP9v8zYFtagWstxe8DDw5ShVjXXgbxNDBjlXyoFXINQFGfuVMQhcsDvHjKVjaFu6HvEU/VduLE8UY43Pa62vxFR4AwGToZgdjXOGJtmpFuiS4Wq3AZ1ZU8mOaX3hFpYwRsShx6PhWxNg9DoxcI4x/VLzUJW+libb4Ebk/+n8bxalZilvXZmx1uT7hTVmXnbF1J2Umxjl1xUZsXBDzfFOAjL3hHCL5jidU+bx3X4BqtV3jr8KymEH6y76a0mThJzCeS09HN9s943GtpCdd1DqQZlqfmbvHO3etgp4D1wNWAEILfvG88H+Q8x+cn5LfdUF606fvDpJdF+s6BQS3yP0AnBf4C4vh7MKas2UAAAAAASUVORK5CYII=" }
]);
ui.menu.on("item_click", item => {
switch (item.title) {
case "更新日志":
app.openUrl(rootUrl + "/app/WoolUpgradeLog.html");
break;
case "檢查更新":
threads.start(function () {
let titileAndVersion = ui.toolbar.getTitle();
let appNameAndVersionArray = titileAndVersion.split("v");
let appName = appNameAndVersionArray[0];
let appVersion = appNameAndVersionArray[1];
var url = rootUrl + "/app/WebService.asmx/CheckAppVersion";
var version = appVersion;
var res = http.post(url, { "appName": appName, "version": version });
var returnString = res.body.string();
let json = JSON.parse(returnString);
if (json.success == "true") {
if (json.data.upgrade == "true") {
app.openUrl(rootUrl + "/app/WebService.asmx/DownLoadWoolUIApk");
} else {
toast("已經(jīng)是最新版");
}
} else {
toast("請求遠(yuǎn)端服務(wù)器出現(xiàn)異常!請稍后重試!");
}
});
break;
case "教程":
app.openUrl("https://blog.csdn.net/zy0412326/article/details/104767602");
break;
case "關(guān)于":
dialogs.build({
title: "關(guān)于",
positive: "確定",
items: ["抖音小助手版純屬個人愛好,如果涉及到侵權(quán)請通知作者,作者會盡快解決相應(yīng)問題。作者郵箱:zy0412326@sina.com"]
}).on("show", (dialog) => { }).show();
break;
case "退出":
ui.finish();
break;
}
});
//讓工具欄左上角可以打開側(cè)拉菜單
ui.toolbar.setupWithDrawer(ui.drawer);
}
/**
* 創(chuàng)建選項菜單(右上角)右上角菜單事件
*/
function initializeHeaderMenu() {
ui.emitter.on("create_options_menu", menu => {
menu.add("更新日志");
menu.add("打賞");
menu.add("教程");
menu.add("關(guān)于");
menu.add("退出");
});
ui.emitter.on("options_item_selected", (e, item) => {
switch (item.getTitle()) {
case "更新日志":
app.openUrl(rootUrl + "/app/WoolUpgradeLog.html");
break;
case "打賞":
app.openUrl(rootUrl + "/app/index.aspx");
break;
case "教程":
app.openUrl("https://blog.csdn.net/zy0412326/article/details/104767602");
break;
case "關(guān)于":
dialogs.build({
title: "關(guān)于",
positive: "確定",
items: ["薅羊毛UI版純屬個人愛好,如果涉及到侵權(quán)請通知作者,作者會盡快解決相應(yīng)問題。作者郵箱:zy0412326@sina.com"]
}).on("show", (dialog) => { }).show();
break;
case "退出":
ui.finish();
break;
}
e.consumed = true;
});
}
/**
 * 初始化配置數(shù)據(jù)
 */
function initializeData() {
let StoryPlateform = woolStorage.get("StoryPlateform");
if (StoryPlateform != null) {
if (StoryPlateform == "七貓免費(fèi)小說") {
ui.spStoryPlateform.setSelection(0);
} else if (StoryPlateform == "番茄免費(fèi)小說") {
ui.spStoryPlateform.setSelection(1);
}
else if (StoryPlateform == "瘋讀小說") {
ui.spStoryPlateform.setSelection(2);
}
}
let StoryName = woolStorage.get("StoryName");
if (StoryName != null) {
ui.txtStoryName.setText(StoryName);
}
let StoryScreenSileTimes = woolStorage.get("StoryScreenSileTimes");
if (StoryScreenSileTimes != null) {
ui.txtStoryScreenSileTimes.setText(StoryScreenSileTimes);
}
let ScreenSileTimesInterval = woolStorage.get("ScreenSileTimesInterval");
if (ScreenSileTimesInterval != null) {
ui.txtScreenSileTimesInterval.setText(ScreenSileTimesInterval);
}
var IsAutoSign = woolStorage.get("IsAutoSign");
if (IsAutoSign != null && IsAutoSign == "true") {
ui.switchIsAutoSign.setChecked(true);
} else {
ui.switchIsAutoSign.setChecked(false);
}
var isShowConsole = woolStorage.get("isShowConsole");
if (isShowConsole != null && isShowConsole == "true") {
ui.switchIsShowConsole.setChecked(true);
} else {
ui.switchIsShowConsole.setChecked(false);
}
}
//#region 初始化事件
function initializeEvent() {
ui.btnAutoStory.click(function () {
let isAutoSign = ui.switchIsAutoSign.isChecked();
let isShowConsole = ui.switchIsShowConsole.isChecked();
let StoryPlateform = ui.spStoryPlateform.getSelectedItem();
let StoryName = ui.txtStoryName.getText();
let StoryScreenSileTimes = ui.txtStoryScreenSileTimes.getText();
let ScreenSileTimesInterval = ui.txtScreenSileTimesInterval.getText();
confirm(tipMessage).then(value => {
//當(dāng)點擊確定后會執(zhí)行這里, value為true或false, 表示點擊"確定"或"取消"
if (value) {
storyThread = threads.start(function () {
threads.start(function () {
auto.waitFor();
app.launchApp(StoryPlateform);
toastLog("正在進(jìn)入" + StoryPlateform + "......");
autoBrush(StoryPlateform, StoryName, StoryScreenSileTimes, ScreenSileTimesInterval, isShowConsole, isAutoSign);
});
});
} else {
}
});
});
ui.btnSaveConfig.click(function () {
woolStorage.put("StoryPlateform", "" + ui.spStoryPlateform.getSelectedItem() + "");
woolStorage.put("StoryName", "" + ui.txtStoryName.getText() + "");
woolStorage.put("StoryScreenSileTimes", "" + ui.txtStoryScreenSileTimes.getText() + "");
woolStorage.put("ScreenSileTimesInterval", "" + ui.txtScreenSileTimesInterval.getText() + "");
woolStorage.put("IsAutoSign", "" + ui.switchIsAutoSign.isChecked() + "");
woolStorage.put("isShowConsole", "" + ui.switchIsShowConsole.isChecked() + "");
toast("自動刷配置保存成功!");
});
}
//#endregion
//#endregion
//#region 業(yè)務(wù)方法
/**
 * 自動刷方法
 * @param {軟件名} appName 
 * @param {閱讀小說名} StoryName 
 * @param {翻頁次數(shù)} StoryScreenSileTimes 
 * @param {翻頁時間間隔} ScreenSileTimesInterval 
 * @param {是否顯示控制臺} isShowConsole 
 * @param {是否自動簽到} isAutoSign 
 */
function autoBrush(appName, StoryName, StoryScreenSileTimes, ScreenSileTimesInterval, isShowConsole, isAutoSign) {
threads.start(function () {
if (isShowConsole) {
console.show();
console.setSize(device.width, device.height / 4);
}
});
sleep(10000);
adolescentWindows();
if (isAutoSign) {
sign(appName);
}
if (appName == '七貓免費(fèi)小說') {
try {
if (className("android.widget.TextView").text("" + StoryName + "").exists()) {
let b = className("android.widget.TextView").text("" + StoryName + "").findOnce().bounds();
click(b.centerX(), b.centerY());
} else {
let bookList = className("android.widget.LinearLayout").find();
if (bookList != null) {
bookList[2].click();
}
}
} catch (e) { }
for (var i = 1; i < StoryScreenSileTimes; i++) {
toastLog("七貓免費(fèi)小說滑動" + i + "次" + "總計:" + StoryScreenSileTimes + "次");
swipe(device.width * 0.65, device.height * 0.05, device.width * 0.08, device.height * 0.05, 300);
let times = parseInt(ScreenSileTimesInterval) * 1000;
sleep(times);
}
} else if (appName == '番茄免費(fèi)小說') {
try {
if (className("android.widget.RadioButton").text('書架').exists()) {
let bookshelf = className("android.widget.RadioButton").text('書架').findOnce();
bookshelf.click();
sleep(2000);
if (className("android.widget.TextView").text("" + StoryName + "").exists()) {
let b = className("android.widget.TextView").text("" + StoryName + "").findOnce().bounds();
click(b.centerX(), b.centerY());
} else {
let booklist = className('android.view.ViewGroup').find();//查找到的所有ViewGroup
if (booklist != null) {
booklist[1].click();//第一本書的ViewGroup
}
}
}
} catch (e) { }
sleep(10000);
for (var i = 1; i < StoryScreenSileTimes; i++) {
toastLog("番茄免費(fèi)小說滑動" + i + "次" + "總計:" + StoryScreenSileTimes + "次");
swipe(device.width * 0.65, device.height * 0.5, device.width * 0.08, device.height * 0.5, 300);
let times = parseInt(ScreenSileTimesInterval) * 1000;
sleep(times);
}
} else if (appName == '瘋讀小說') {
if (className("android.widget.TextView").text("" + StoryName + "").exists()) {
let b = className("android.widget.TextView").text("" + StoryName + "").findOnce().bounds();
click(b.centerX(), b.centerY());
} else {
let bookList=className("android.view.ViewGroup").find();
if(bookList.length!=0){
console.warn(bookList.length);
bookList[1].click();
}
}
for (var i = 1; i < StoryScreenSileTimes; i++) {
toastLog("瘋讀小說滑動" + i + "次" + "總計:" + StoryScreenSileTimes + "次");
swipe(device.width * 0.65, device.height * 0.05, device.width * 0.08, device.height * 0.05, 300);
let times = parseInt(ScreenSileTimesInterval) * 1000;
sleep(times);
}
}
}
/**
 * 小說簽到
 * @param {平臺名} appName 
 */
function sign(appName) {
sleep(1000);
if (appName == '七貓免費(fèi)小說') {
if (className("android.widget.TextView").text("福利").exists()) {
let b = className("android.widget.TextView").text("福利").findOnce().bounds();
click(b.centerX(), b.centerY());
}
sleep(3000);
try {
if (className("android.view.View").text("簽到+20金幣").exists()) {
console.info("七貓免費(fèi)小說。福利簽到+20金幣");
className("android.view.View").text("簽到+20金幣").findOnce().click();
recordSignTime(appName);
} else if (className("android.view.View").text("已簽到").exists()) {
toastLog("已簽到記錄時間");
className("android.view.View").text("已簽到").findOnce().click();
recordSignTime(appName);
}
if (className("android.view.View").text("立即簽到").exists()) {
className("android.view.View").text("立即簽到").findOnce().click();
recordSignTime(appName);
}
sleep(3000);
recordSignTime(appName);//記錄時間
back();
if (className("android.widget.TextView").text("書架").exists()) {
let b = className("android.widget.TextView").text("書架").findOnce().bounds();
click(b.centerX(), b.centerY());
}
} catch (e) { }
} else if (appName == '番茄免費(fèi)小說') {
if (className("android.widget.RadioButton").text("福利").exists()) {
console.log("番茄免費(fèi)小說,點擊福利");
className("android.widget.RadioButton").text("福利").findOnce().click();
sleep(3000);//福利頁面加載很慢所以等一會
recordSignTime(appName);
if (className("android.widget.RadioButton").text("書架").exists()) {
className("android.widget.RadioButton").text("書架").findOnce().click();
}else{
back();
}
sleep(2000);
}
} else if (appName == '瘋讀小說') {
if (className("android.widget.TextView").text("我").exists()) {
let b = className("android.widget.TextView").text("我").findOnce().bounds();
click(b.centerX(), b.centerY());
}
sleep(3000);//特別慢得等一會
if (className("android.widget.TextView").text("福利中心").exists()) {
let b = className("android.widget.TextView").text("福利中心").findOnce().bounds();
click(b.centerX(), b.centerY());
}
sleep(12000);//更慢
if (className("android.widget.Button").text("繼續(xù)").exists()) {
let b = className("android.widget.TextView").text("繼續(xù)").findOnce().click();
}
sleep(3000);
if (className("android.view.View").text("去簽到").exists()) {
recordSignTime(appName);
let b = className("android.view.View").text("去簽到").findOnce().click();
}
recordSignTime(appName);
back();
if (className("android.widget.TextView").text("書架").exists()) {
let b = className("android.widget.TextView").text("書架").findOnce().bounds();
click(b.centerX(), b.centerY());
}
sleep(1000);//慢得等一會
}
}
//#endregion
//#region 公共方法
/**
 * 輸出Tosat和Info日志
 * @param {日志消息} messagge 
 */
function toastInfo(message) {
toast(message);
console.info(getTime() + "" + message);
}
/**
 * 輸出Tosat和Error日志
 * @param {日志消息} messagge 
 */
function toastError(message) {
toast(message);
console.error(getTime() + "" + message);
}
function toastLog(message) {
toast(message);
console.log(getTime() + "" + message);
}
function toastWarn(message) {
toast(message);
console.warn(getTime() + "" + message);
}
/**
 * 記錄App簽到時間
 * @param {App名稱} appName 
 */
function getSignTime(appName) {
let key = appName + storaySign;
let value = woolStorage.get(key);
return value;
}
function Color(color) {
return android.graphics.Color.parseColor(color);
}
function GradientDrawable(orientation, color) {
var colors = [];
color.forEach(color => colors.push(Color(color)));
return new android.graphics.drawable.GradientDrawable(android.graphics.drawable.GradientDrawable.Orientation[orientation], colors);
}
/**
 * 青少年窗口
 */
function adolescentWindows() {
if (text("我知道了").exists()) {
text("我知道了").findOnce().click();
}
if (text("知道了").exists()) {
text("知道了").findOnce().click();
}
}
/**
 * 記錄App簽到時間
 * @param {App名稱} appName 
 */
function recordSignTime(appName) {
let key = appName + storaySign;
let value = getDate();
woolStorage.put(key, value);
}
/**
 * 記錄App一次運(yùn)行的時間
 * @param {appName} appName 
 * @param {本次運(yùn)行時間} recordTimes 
 */
function appRunTimeRecord(appName, recordTimes) {
let key = appName + storaySign + getDate();
var havedRunTimes = woolStorage.get("" + key + "");
let value = "";
if (havedRunTimes == null) {
woolStorage.put(key, parseInt(recordTimes));
} else {
value = parseInt(havedRunTimes) + parseInt(recordTimes);
woolStorage.put(key, value);
}
}
/**
 * 秒轉(zhuǎn)換成小時
 * @param {*} appCount 
 * @param {*} foreachCount 
 * @param {*} slideTimes 
 * @param {*} timesInterval 
 * @param {*} isExistsLongTimes 
 */
function computerTime(appCount, foreachCount, slideTimes, timesInterval, isExistsLongTimes) {
let maxSecond = appCount * foreachCount * slideTimes * timesInterval;
let maxHour = maxSecond / 3600;
return Math.round(maxHour);
}
/**
 * 獲取當(dāng)前時間格式y(tǒng)yyyMMdd
 */
function getDate() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
if (month < 10) {
month = "0" + month;
};
var day = date.getDate();
if (day < 10) {
day = "0" + day;
};
return year + "-" + month + "-" + day;
}
function getTime() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
if (month < 10) {
month = "0" + month;
};
var day = date.getDate();
if (day < 10) {
day = "0" + day;
};
var hour = date.getHours();
if (hour < 10) {
hour = "0" + hour;
};
var minute = date.getMinutes();
if (minute < 10) {
minute = "0" + minute;
};
return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + "0";
};
//#endregion

到此,關(guān)于“怎么用Android4.1.0實現(xiàn)自動閱讀小說”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
文章名稱:怎么用Android4.1.0實現(xiàn)自動閱讀小說
文章源于:http://weahome.cn/article/gpsoec.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部