Open tuanmjnhdeveloper opened 1 month ago
Need more information, such as sample code. Also, pay attention to the recycling of some image resources in your code.
Need more information, such as sample code. Also, pay attention to the recycling of some image resources in your code.
function onReStart() { indexBot = 0; repeat++; utils.shuffle(bots); window.autoBot.RepeatTime.setText(repeat + ""); // log(
Repeat: ${repeat}); toast(
Repeat: ${repeat}); if (utils.isRooted()) { utils.forceStopAppRootAccess("org.telegram.messenger"); sleep(3000); } else { utils.forceStopApp("org.telegram.messenger"); sleep(6000); } onStart(); }
// var threadsDisposable = threads.disposable(); var threadsStartMain = null; var threadsStartFile = null; var scriptFile = null; var execFile = null; var engine = null;
function onStart() { if (bots.length < 1) { toast("No bot to run!") return; } isAutoBot = true; threadsStartMain = threads.start(() => { try { sleep(2000); while (isAutoBot) { scriptFile = files.join(bots[indexBot].p, bots[indexBot].k); // log(
Running: ${file}`)
sleep(1000);
threadsStartFile = threads.start(() => {
execFile = engines.execScriptFile(scriptFile);//,{ delay: 5000, interval:, loopTimes: 0 }
});
sleep(3000);
// isDestroyed = utils.isDestroyedEngine(engine, 5000);
while (true) {
sleep(2000);
engine = execFile.getEngine();
// console.log(engine);
// console.log(engine.toString());
// console.log(engines.all());
// console.log(thread);
// console.log(threadStart.isAlive());
if (engine.isDestroyed()) {
threadsStartFile.interrupt();
engine.forceStop();
engine = null;
execFile = null;
scriptFile = null;
// console.log(thread.isAlive());
java.lang.System.gc();
break;
}
} // Check every second if the script is done
indexBot++;
if (indexBot >= bots.length) {
// indexBot = 0;
// repeat++;
// utils.shuffle(bots);
// window.autoBot.RepeatTime.setText(repeat + "");
// // log(`Repeat: ${repeat}`);
// toast(`Repeat: ${repeat}`);
// sleep(2000);
onReStart();
console.log("restart");
break;
}
};
} catch (error) {
console.log(error);
// alert("error", error);
files.write(utils.logsMainPath, error);
}
}); }; floatyWindow.zip
I not use findColor or findImage function. I just use find text for all automation. I used global variable but still got error after about 30 to 40 minutes of running. Please help me!
You can write a simple and runnable demo and push it on GitHub. I can't check this now
You can write a simple and runnable demo and push it on GitHub. I can't check this now
https://github.com/tuanmjnhdeveloper/autoxjs-demo
i think error in "execScriptFile", Maybe this function loads the script file and executes the command, but when it finishes, it doesn't release memory.
I done it. Please check for me. Thank you so much!
You can write a simple and runnable demo and push it on GitHub. I can't check this now
https://github.com/tuanmjnhdeveloper/autoxjs-demo
i think error in "execScriptFile", Maybe this function loads the script file and executes the command, but when it finishes, it doesn't release memory.
I done it. Please check for me. Thank you so much!
utils.js Method missing, unable to reproduce oom exception, please provide a simpler demo.
You can write a simple and runnable demo and push it on GitHub. I can't check this now
https://github.com/tuanmjnhdeveloper/autoxjs-demo i think error in "execScriptFile", Maybe this function loads the script file and executes the command, but when it finishes, it doesn't release memory. I done it. Please check for me. Thank you so much!
utils.js Method missing, unable to reproduce oom exception, please provide a simpler demo.
that i call libaray. you can run in Emulator app Autox.js, dont run in visual code. i was make a simple demo bro. plase check again it. Thank you so much
When I run for a long time this error appears. Please help me fix this part.