ACBS
注意:该软件在vivo手机上可能存在BUG,无法打开’知到’软件,且部分功能失效。
基本信息: 作者:Small-J ;
开发语言:JavaScript ;
开发软件:VsCode、Auto.js ;
测试机型:HUAWEI p30 (分辨率:(1080,2340));
软件基本信息:
1、该软件为’知到‘(智慧树)刷课软件;
2、该软件具有自动回答弹窗问题功能和计时功能,无需手动回答,指定时间,时间到自动退出软件;
3、刷课时,请勿在手机上打开其他软件界面,请保持在程序自动打开的界面,以免出错(可选择在睡觉、吃饭、上课等时段进行刷课,或可选择备用机进行刷课);
4、其它具体信息,请前往软件中查看,请仔细阅读 ‘注意事项’;
软件下载: 百度网盘下载链接:https://pan.baidu.com/s/18Rn2NQFlir2t3xG69-DkGg
提取码:CXYJ
教程: 安装教程:安装时,可能需要用户输入密码,比如华为用户在安装时,需要关闭手机的纯净模式。
使用教程:在运行软件前,请先将软件(ACBS)的悬浮窗权限打开,接着运行软件。然后点击开始运行,会进入无障碍设置界面,打开软件的无障碍模式(注意:有时候要设置两次无障碍模式),回到手机桌面,设置完后就能正常运行。
软件源码: (仅供参考)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 var window = floaty.window ( <frame > <button id ="action" text ="开始运行" w ="90" h ="40" bg ="#77ffffff" /> </frame > ); var cmd_x=point_x (50 );var cmd_y=point_y (300 );function point_x (x ){ x1=device.width /1080 return x*x1; } function point_y (y ){ y1=device.height /2340 return y*y1; } console .setPosition (cmd_x, cmd_y);console .show ();sleep (500 );var cmd_x=point_x (1000 );var cmd_y=point_y (1700 );console .setSize (cmd_x, cmd_y);console .error ("欢迎使用ACBS!" );console .error ("悬浮窗可拖动,长按1.5秒即可退出程序!(建议不要拖动,当前位置为最佳位置)" );console .log ("作者:JL" );console .log ("版本:5.5.2" );console .log ("注意事项:" );console .error (" 1.该软件在vivo手机上可能存在BUG,无法打开'知到'软件,且部分功能失效。" );console .log (" 2.该软件为智慧树(知到)自动刷课软件。" );console .log (" 3.使用该软件前,确保在'知到'内已登入自己的账号。" );console .log (" 4.使用软件时确保网络流畅,若网络出现卡顿,或脚本出现错误,请重新启动脚本。" );console .log (" 5.刷课程时,请将手机竖屏,该软件仅支持竖屏刷课。(比较菜,哈哈哈^v^)" );console .log (" 6.该软件每次只能刷一门课程,若要刷其它课程,请重新启动脚本,输入要挂的课程名。" );console .log (" 7.该软件有自动回答弹窗题目功能,但答案不一定正确。" );console .log (" 8.该软件有指定刷课时长功能,可指定刷课的时长,达到指定时长就会自动退出脚本。" );console .log (" 9.智慧树有平时习惯的要求是每天至少看半个小时左右就有习惯分,持续两周基本可以拿满。如果几天内将视频刷完,那习惯分就很低或者没有。视频刷完了,习惯分就不变了。如果还剩有课程,那么按照每天25分钟观看课程,还是可以提高学习习惯分的。另外还要注意,到底有没有习惯分,有时候习惯分为0,这需要注意。" );console .log (" 10.获得智慧树网课的学习习惯分,每门课程需要达到一定的学习频次,每次需满足合理学习时长25分钟及以上,才能获得学习习惯分,也就是说已规律学习的天数越多,学习习惯分越高。具体每门课所需的学习频次可以在【成绩分析】模块中的“学习习惯”中进行查看。" );console .log ("好了,现在有了ACBS,请好好利用节约出来的时间^~^。" );setInterval (()=> {}, 1000 );var execution = null ;var x = 0 , y = 0 ;var windowX, windowY;var downTime;window .action .setOnTouchListener (function (view, event ){ switch (event.getAction ()){ case event.ACTION_DOWN : x = event.getRawX (); y = event.getRawY (); windowX = window .getX (); windowY = window .getY (); downTime = new Date ().getTime (); return true ; case event.ACTION_MOVE : window .setPosition (windowX + (event.getRawX () - x), windowY + (event.getRawY () - y)); if (new Date ().getTime () - downTime > 1500 ){ if (execution){ engines.all ().map ((ScriptEngine ) => { if (engines.myEngine ().toString () !== ScriptEngine .toString ()) { ScriptEngine .forceStop (); } }); } console .hide (); threads.start (function ( ){ execution = engines.execScriptFile ("console.js" ); exit (); }); } return true ; case event.ACTION_UP : if (Math .abs (event.getRawY () - y) < 5 && Math .abs (event.getRawX () - x) < 5 ){ onClick (); } return true ; } return true ; }); function onClick ( ){ if (window .action .getText () == '开始运行' ){ threads.start (function ( ){ execution = engines.execScriptFile ("home.js" ); }); execution = engines.execScriptFile ("click.js" ); console .hide (); window .action .setText ('停止运行' ); }else { if (execution){ engines.all ().map ((ScriptEngine ) => { if (engines.myEngine ().toString () !== ScriptEngine .toString ()) { ScriptEngine .forceStop (); } }); } window .action .setText ('开始运行' ); threads.start (function ( ){ execution = engines.execScriptFile ("home.js" ); }); if (id ("md_title" ).findOnce ()){ click ('确定' ); } } } var password=rawInput ("请输入检验码" );if (password=="" ){ var ERROR = confirm ("ERROR:检验码不能为空!" ); engines.stopAllAndToast (); sleep (1000 ); } else if (password != '8023' ){ var ERROR = confirm ("ERROR:检验码错误!" ); engines.stopAllAndToast (); sleep (1000 ); } else { var OK = confirm ("欢迎使用自动化刷课脚本(ACBS)\n" ); } sleep (1000 );function clicks (x,y ){ x1=device.width /1080 ; y1=device.height /2340 ; click (x*x1,y*y1); } var name=rawInput ("请输入课程名称" );if (name=="" ){ var ERROR = confirm ("ERROR:课程名不能为空!" ); engines.stopAllAndToast (); } sleep (1000 );click ("知到" );sleep (4100 );if (className ("android.widget.TextView" ).text ("当前网络不可用" ).findOnce ()){ threads.start (function ( ){ execution = engines.execScriptFile ("home.js" ); }); var ERROR = confirm ("ERROR:请检查网络是否连接正常!" ); engines.stopAllAndToast (); } else { engines.execScriptFile ("KillApp.js" ); sleep (5000 ); if (className ("android.widget.TextView" ).text ("知到" ).findOnce ()){ sleep (1000 ); className ("android.widget.TextView" ).text ("知到" ).findOnce ().click (); } else { var ERROR = confirm ("ERROR:未找到‘知到’软件,请检查‘知到’软件是否在手机桌面!!!" ); engines.stopAllAndToast (); } sleep (6000 ); if (className ("android.widget.TextView" ).text ("当前网络不可用" ).findOnce ()){ threads.start (function ( ){ execution = engines.execScriptFile ("home.js" ); }); var ERROR = confirm ("ERROR:请检查网络是否连接正常!" ); engines.stopAllAndToast (); } clicks (899 ,170 ); sleep (1500 ); clicks (405 ,2252 ); sleep (6000 ); swipe (598 , 1333 , 598 , 860 , 500 ); sleep (1000 ); if (id ("tv_course_credit_name" ).className ("android.widget.TextView" ).text (name).findOnce ()){ click (name); sleep (5000 ); } else { home (); var ERROR = confirm ("ERROR:未找到对应课程,请检查输入正确的课程名称!" ); engines.stopAllAndToast (); } sleep (1000 ); clicks (531 ,466 ); if (className ("android.widget.TextView" ).text ("正在使用非WI-FI网络,精彩内容不容错过" ).findOnce ()){ sleep (4000 ); clicks (536 ,486 ); } var execution = null ; threads.start (function ( ){ execution = engines.execScriptFile ("time.js" ); threads.shutDownAll (); }); sleep (3000 ); while (1 ){ sleep (1500 ); if (!(id ("md_buttonDefaultPositive" ).text ("确定" ).findOnce ())){ while (true ){ sleep (1500 ); if (id ("md_buttonDefaultPositive" ).text ("确定" ).findOnce ()){ break ; } if (className ("android.view.View" ).text ("判断题" ).findOnce ()){ className ("android.widget.ListView" ).findOnce ().children ().forEach (child => { var target = child.findOne (className ("android.widget.TextView" )); target.click (); }); sleep (1000 ); clicks (949 ,397 ); } else if (className ("android.view.View" ).text ("单选题" ).findOnce ()){ className ("android.widget.ListView" ).findOnce ().children ().forEach (child => { var target = child.findOne (className ("android.widget.TextView" )); target.click (); }); sleep (1000 ); clicks (949 ,397 ); } else if (className ("android.view.View" ).text ("多选题" ).findOnce ()){ className ("android.widget.ListView" ).findOnce ().children ().forEach (child => { var target = child.findOne (className ("android.widget.TextView" )); target.click (); }); sleep (1000 ); clicks (949 ,397 ); } else { sleep (1000 ); clicks (116 ,575 ); } if (className ("android.view.View" ).text ("未作答的弹题不能关闭" ).findOnce ()){ sleep (1000 ); clicks (706 ,1855 ); } if (className ("android.widget.TextView" ).text ("温馨提示" ).findOnce ()){ sleep (1000 ); id ("tv_peace_socre" ).findOnce ().click (); sleep (1000 ); className ("android.view.View" ).text ("返回" ).findOnce ().click (); } } } } } var cmd_x=point_x (20 ); var cmd_y=point_y (1900 ); function point_x (x ){ x1=device.width /1080 return x*x1; } function point_y (y ){ y1=device.height /2340 return y*y1; } var time_count=rawInput ("请指定刷课时长\n时间单位为(分钟)\n默认不输入为无时长限制\n输入0退出当前脚本\n温馨提示:在刷课过程中可能有网路延迟,输入的时长请大于目标时长" ,"30" );if (time_count=="0" ){ home (); engines.stopAllAndToast (); } else if (time_count == "" ){ time_count=0 ; } else if (time_count<0 || !(time_count>0 )){ var ERROR = confirm ("ERROR:请输入符合标准的时间!" ); while (1 ){ time_count=0 ; var time_count=rawInput ("请指定刷课时长\n时间单位为(分钟)\n默认不输入为无时长限制\n输入0退出当前脚本\n温馨提示:在刷课过程中可能有网路延迟,输入的时长请大于目标时长" ,"30" ); if (time_count=="0" ){ home (); engines.stopAllAndToast (); } else if (time_count<0 || !(time_count>0 )){ if (time_count == "" ){ time_count=0 ; break ; } var ERROR = confirm ("ERROR:请输入符合标准的时间!" ); } else if (time_count>0 ){ break ; } } } sleep (100 );console .setPosition (cmd_x, cmd_y); console .show (); sleep (100 );var cmd_x=point_x (700 ); var cmd_y=point_y (500 ); console .setSize (cmd_x, cmd_y); console .log ("00:00:00" ); time_count=time_count*60 ; var time=0 ; setInterval (function ( ){ time++; let s=parseInt (time*1000 /1000 %60 ); let m=parseInt (time*1000 /1000 /60 %60 ); let h=parseInt (time*1000 /1000 /60 /60 ); if (parseInt (s/10 )==0 ){ s="0" +s; } if (parseInt (m/10 )==0 ){ m="0" +m; } if (parseInt (h/10 )==0 ){ h="0" +h; } console .clear (); console .log (h+":" +m+":" +s); if (time_count==time){ console .error ("时间到!" ); engines.all ().map ((ScriptEngine ) => { if (engines.myEngine ().toString () !== ScriptEngine .toString ()) { ScriptEngine .forceStop (); } }); threads.start (function ( ){ execution = engines.execScriptFile ("home.js" ); }); exit (); } }, 1000 ); killApp ("知到" );function killApp (appName ) { let forcedStopStr = ["结束" , "停" , "强" ]; let packageName = app.getPackageName (appName); if (packageName) { app.openAppSetting (packageName); sleep (1500 ); text (appName).waitFor (); for (var i = 0 ; i < forcedStopStr.length ; i++) { if (textContains (forcedStopStr[i]).exists ()) { sleep (100 ); let forcedStop = textContains (forcedStopStr[i]).findOne (); if (forcedStop.enabled ()) { text ("强行停止" ).waitFor (); var 结束运行 = text ("强行停止" ).findOne ().bounds (); click (结束运行.centerX (), 结束运行.centerY ()); sleep (500 ); forcedStop.click (); text ("强行停止" ).findOne ().click (); sleep (500 ); home (); break ; } } } } } home ();sleep (2000 );var cmd_x=point_x (50 );var cmd_y=point_y (300 );function point_x (x ){ x1=device.width /1080 return x*x1; } function point_y (y ){ y1=device.height /2340 return y*y1; } console .setPosition (cmd_x, cmd_y);console .show ();sleep (500 );var cmd_x=point_x (700 );var cmd_y=point_y (1000 );console .setSize (cmd_x, cmd_y);console .log ("拜拜 (* ~ *)\n\n\n" );sleep (1500 );console .log ("下次再来 (~ _ ~)\n\n\n" );sleep (1500 );console .log ("别忘了我 (T ~ T)" );sleep (1000 );console .hide ();