Jump to content

chatbox interface


Recommended Posts

Posted

aye i'm currently making a fisher / cooker bot, but i ran into this trouble when writing my script. How can i check if this interface is there in the chatbox and when its not?

 

should i search for strings or something? or just get the interface id? and if one of those, can you possibly give me an example. Thanks!

nimetön.png

Posted (edited)

Get the interface by id or text and check if it isn't null and then if it is visible.

Edit code: 

RS2Widget widget = getWidgets().get(270,1);
        if(widget != null && widget.isVisible()) {
            log("Open");
        }else {
            log("Close");
        } 

Here is the library https://osbot.org/api/org/osbot/rs07/api/Widgets.html

Edited by inababila

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...