脚本函数-银装素裹-冰狐

发布时间:2026/6/24 20:40:23

脚本函数-银装素裹-冰狐 启动app: launchapp(例 let retlaunchApp(cn.jxhb123.jxsq123, txt:邀请有奖);if(0ret){console.log(启动失败);return}清理后台refresh({appName:冰狐智能辅助});// 刷新killBackgroundApp(com.tencent.mm);// 后台杀掉微信获取权限requestScreenShot()获取自定义数据data在设备自定义数据中添加constresJSON.parse(getDeviceCustomData(data,[]))获取几分钟ms值时间戳/做倒计时使用functiongetAfterTime(){constnowTimestampnewDate().getTime();constfiveMinutes5*60*1000;// 5分钟ms值// 3. 加上5分钟后的时间戳constafter5minTimestampnowTimestampfiveMinutes;returnafter5minTimestamp}当前时间戳做对比constnowTimestampnewDate().getTime();随机获取名字// 获取随机姓名functiongetPersonName(){//随机姓氏constmains[李,王,张,刘,陈,杨,赵,黄,周,吴,徐,孙,胡,朱,高,林,何,郭,马,罗,梁,宋,郑,谢,韩,唐,冯,于,董,萧,程,曹,袁,邓,许,傅,沈,曾,彭,吕,苏,卢,蒋,蔡,贾,丁,魏,薛,叶,阎];constcon[德,永,承,世,昌,文,明,显,耀,宗,光,耀,祖,泽,长,兴,隆,盛,安,定,修,齐,治,平,仁,义,礼,智,信,忠,孝,廉,节,勇,毅,谦,和,顺,福,寿,康,宁,泰,祥,瑞,庆,繁,茂,荣,华,启,继,绍,维,守,敦,厚,崇,正,端,肃,庄,敬,慎,勤,俭,廉,洁,宽,裕,温,良,恭,俭,让,贞,元,亨,利,贞,嘉,兆,景,运,开,泰,鸿,禧,麟,凤,龙,虎,麟,麒,鹏,鹤,松,柏,兰,桂];constmin[远,默,然,辰,川,行,言,川,安,宁,霆,锋,骁,凛,策,骁,朗,擎,烨,铮,婉,瑶,玥,妍,蕊,萱,莹,芷,瑶,芊,深,白,欢,歌,遥,亭,雪,风,舟,梧,诺,轩,桐,涵,宇,怡,杰,瑶,豪,嫣];constnameAllmains[Math.floor(Math.random()*mains.length)]con[Math.floor(Math.random()*con.length)]min[Math.floor(Math.random()*min.length)]returnnameAll}粘贴文本方式一varretfindView(cn:com.android.EditText);if(ret.length0){paste(ret.views[0],谢谢,{afterWait:3000});}方式二paste(cn:com.android.EditText, 谢谢,{afterWait:3000});滚动调用scrolls(up)functionscrolls(fangxaing){// 滚动方向: up向上滚动down向下滚动left向左滚动right向右滚动scroll(null,fangxaing,{type:1,distance:0.95,afterWait:2000});}日志后台和移动端日志// 日志后台和移动端日志functionlogInfo(string,duration){console.log(日志string,延时durationms)toast(string,duration)}在线识别判断是否存在// 在线识别判断是否存在functionisOcrFindView(txt){let resocrFindView(txt)console.log(res:res)if(res.tag){returntrue}else{returnfalse}}在线识别点击ocrClick//识别点击functionisOcrClick(str){let retocrClick(str);console.log(str:ret);returnret}获取坐标区域functiongetOcrFindViewByXY(txt){let resocrFindView(txt,{afterWait:2*1000})console.log(res:res)if(res.tag){returnres.region}else{returnundefined}}手势点击// 手势点击functionpublicGestureClick(x,y){gestureClick(x,y);或者gestureClick(668,107,{beforeWait:3*1000,afterWait:3*1000});}切换应用functionapplication(){refresh({appName:惊喜红包},{afterWait:3*1000});// recentApps()}打开链接openUrl(http://www.baidu.com);剪切 配合 长按使用setClipboardData(hello);获取 剪切 数据函数vardatagetClipboardData();console.log(data:,data)长按第一个坐标180,110第二个坐标180,110保持一致实现长按multiGestureClick([180,110,180,110],{duration:4*1000,afterWait:2000});

相关新闻