alkku15 Posted March 6, 2018 Share Posted March 6, 2018 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! Quote Link to comment Share on other sites More sharing options...
inababila Posted March 6, 2018 Share Posted March 6, 2018 (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 March 6, 2018 by inababila Quote Link to comment Share on other sites More sharing options...
alkku15 Posted March 6, 2018 Author Share Posted March 6, 2018 6 minutes ago, inababila said: Get the interface by id or text and check if it isn't null and then if it is visible. whats the command for that? for example for inventory its just "inventory.contains(1412581285712857)". Whats the command for interfaces ty Quote Link to comment Share on other sites More sharing options...
Fruity Posted March 6, 2018 Share Posted March 6, 2018 2 minutes ago, alkku15 said: whats the command for that? for example for inventory its just "inventory.contains(1412581285712857)". Whats the command for interfaces ty widgets Quote Link to comment Share on other sites More sharing options...
alkku15 Posted March 6, 2018 Author Share Posted March 6, 2018 thanks to both of ya Quote Link to comment Share on other sites More sharing options...
inababila Posted March 6, 2018 Share Posted March 6, 2018 3 minutes ago, alkku15 said: thanks to both of ya No problem, and if you need anything, let me know! Quote Link to comment Share on other sites More sharing options...
Alek Posted March 6, 2018 Share Posted March 6, 2018 You shouldn’t use ids. Use strings or sprites 1 Quote Link to comment Share on other sites More sharing options...
d0zza Posted March 7, 2018 Share Posted March 7, 2018 If you're wondering how to get the widget ids/strings you need use the widget debugger in osbot settings. Quote Link to comment Share on other sites More sharing options...