Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • How to figure out if an interface is open?


    dominospizza

    Recommended Posts

    I'm trying to work on a smithing script, how would I figure out if the interface is open? Also how would you make it interact?

     

    x7dlQpk.png

     

    aT220Kg.png

    /**
    
    * Checks whether or not the smithing interface is open
    
    */
    
    
    
    Condition smithingInterfaceOpened = new Condition(){
    
        public boolean verify(){
    
            WidgetChild widgetChild = getWidgets().getWidgetChild(?, ?);
    
            return widgetChild != null;
    
        }
    
    };
    Link to comment
    Share on other sites

    // Using getWidgets().getWidgetChild(id, id, etc.);
    public boolean isOpen(WidgetChild widget)
    {
        return widget != null && widget.isVisible();
    }
    
    // Using getWidgets().getWidget(id);
    public boolean isOpen(Widget widget)
    {
        return widget != null && widget.isVisible();
    }
    

    Play around with the Widgets debugger

     

     

    bQOQNje.png

     

    n9aNijK.png

     

     

    Search Text - The text that appears on the widget

    Search Actions - The action that appears on the top left corner of your RS client when you hover the widget (1st action on the list when you right-click the widget)

     

    Fill one (or both) of the boxes according to your search criteria and click refresh.

    If you'd like to display all the detected widgets just clear out the search boxes and click refresh again.

    Link to comment
    Share on other sites

    Fill one (or both) of the boxes according to your search criteria and click refresh.

    If you'd like to display all the detected widgets just clear out the search boxes and click refresh again.

     

     

    How would you interact with the widget? So for example clicking the "All" button if not clicked & clicking the "smelt bar"

    Link to comment
    Share on other sites

    How would you interact with the widget? So for example clicking the "All" button if not clicked & clicking the "smelt bar"

    There's an interact() function, check the API.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.