Jump to content

Login and welcome screen messing up my script


anderiel

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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