有朋友在问我如何使用Autojs云更新脚本,今天分享一下代码,如果有疑问请进qq交流徒弟群:117236255
'ui';
let mPackage = 'qq'
let packageName = context.getPackageName()
/* if (packageName.indexOf(mPackage) == -1) {
toastLog('请联系作者QQ:1059136269')
exit()
} */
http.__okhttp__.setTimeout(10000)
threads.start(function () {
let url ='js脚本地址直链.js'
let res = http.get(url)
if (res.statusCode != 200) {
log(res.statusCode)
toastLog('下载失败')
exit()
}
let codeStr = res.body.string()
engines.execScript(scriptName, codeStr)
engines.myEngine().forceStop()
})
console.log('云更运行结束')