DirtyDick Posted April 18, 2022 Share Posted April 18, 2022 I'm trying to set up a simple logout function but for some reason it's not working. log("No money - logging off in 5 seconds"); sleep(5000); log("logging off"); getLogoutTab().logOut(); When I run this, the log and sleeps work and then the bot navigates to the logout tab, highlights the 'logout' button and then does nothing Quote Link to comment Share on other sites More sharing options...
DirtyDick Posted April 18, 2022 Author Share Posted April 18, 2022 I've managed to log out now using log("No money - logging off in 5 seconds"); sleep(5000); log("logging off"); getLogoutTab().open(); getLogoutTab().logOut(); but the auto-logger just logs me back in repeatedly - how can I terminate the script if I have logged off, without the onLoop continuing to loop? Quote Link to comment Share on other sites More sharing options...
DirtyDick Posted April 18, 2022 Author Share Posted April 18, 2022 Tried calling onExit but the bot is still initiating the Auto-Login solver log("No money - logging off in 5 seconds"); sleep(5000); log("logging off"); getLogoutTab().open(); getLogoutTab().logOut(); onExit(); Quote Link to comment Share on other sites More sharing options...
B0lss Posted April 18, 2022 Share Posted April 18, 2022 Use stop(); 1 Quote Link to comment Share on other sites More sharing options...
DirtyDick Posted April 18, 2022 Author Share Posted April 18, 2022 2 hours ago, B0lss said: Use stop(); Tyvm, is there any way to utilize this so that the script stops but the client doesn't automatically log you out? Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted April 18, 2022 Share Posted April 18, 2022 (edited) 44 minutes ago, DirtyDick said: Tyvm, is there any way to utilize this so that the script stops but the client doesn't automatically log you out? stop(false); Read the api https://osbot.org/api/org/osbot/rs07/script/Script.html Edited April 18, 2022 by Khaleesi 1 Quote Link to comment Share on other sites More sharing options...
DirtyDick Posted April 18, 2022 Author Share Posted April 18, 2022 3 hours ago, Khaleesi said: stop(false); Read the api https://osbot.org/api/org/osbot/rs07/script/Script.html Thanks Khal and you're right, I'll read the API ps thank you for your awesome wintertodt script, I got to 200m fm xp on a hcim babysitting it a few years ago without dying or getting banned 1 Quote Link to comment Share on other sites More sharing options...
TheCongregation Posted March 5 Share Posted March 5 (edited) I've tried all of these suggestions and my script still wont logout on exit EDIT: now stop(); works but it didn't when I posted, not sure what happened to fix it Edited March 15 by TheCongregation Quote Link to comment Share on other sites More sharing options...