Jump to content

Login and welcome screen messing up my script


Recommended Posts

Posted

So, what i am trying to do here. I wanted my script to logout for a given period of time and then log back in and resume what it was doing.

 

Logouting is fine, waiting for the given amount too. But when the login starts things start to get messed up.

 

Because the login random even and the welcome screen random event are two different things and there is a delay between them. And in that delay my script happily resumes and gets a null ptr error since it cant find any objects.

 

How to solve that?

Posted (edited)

You probably want to use one of the client methods: http://osbot.org/api/org/osbot/rs07/api/Client.html like client#isLoggedIn() or client#getLoginState().

Hmm in the welcome screen you're already logged in since it activates when  client.isLoggedIn() && widgets.isVisible(378);

You could also check for that widget (or specific colors) yourself.

Edited by Flamezzz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...