trainux Posted May 23, 2018 Share Posted May 23, 2018 I understand that I start the "execute" function and start the session. How do I disable it? For what? What do I try to do? I have a "Timer" that checks a valid time to play, at a certain time it indicates that I stop playing, but when it enters this range the bot starts and starts indefinitely without doing anything, so I would like to disable this function until it is time to play again. I was investigating the tool:A Simple Login Handler Personalize this to my liking, the problem is that I do not know how to place the conditional to stop the automatic. EYE: Do not "stop (true)" because it stops the script. Quote Link to comment Share on other sites More sharing options...
Muffins Posted May 23, 2018 Share Posted May 23, 2018 18 minutes ago, trainux said: I understand that I start the "execute" function and start the session. How do I disable it? For what? What do I try to do? I have a "Timer" that checks a valid time to play, at a certain time it indicates that I stop playing, but when it enters this range the bot starts and starts indefinitely without doing anything, so I would like to disable this function until it is time to play again. I was investigating the tool:A Simple Login Handler Personalize this to my liking, the problem is that I do not know how to place the conditional to stop the automatic. EYE: Do not "stop (true)" because it stops the script. you need to launch osbot in CLI with the -allow norandoms argument Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 24, 2018 Share Posted May 24, 2018 You could override the break manager and have it break whenever it isn't a "valid time to play" 1 Quote Link to comment Share on other sites More sharing options...
trainux Posted May 25, 2018 Author Share Posted May 25, 2018 17 hours ago, FrostBug said: You could override the break manager and have it break whenever it isn't a "valid time to play" Thank you, solve it with something like this: int onLoop() { if (client.isLoggedIn()) doTasks(); else initLoginHandler(); } Quote Link to comment Share on other sites More sharing options...