alkku15 Posted March 6, 2018 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!
inababila Posted March 6, 2018 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
alkku15 Posted March 6, 2018 Author 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
Fruity Posted March 6, 2018 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
inababila Posted March 6, 2018 Posted March 6, 2018 3 minutes ago, alkku15 said: thanks to both of ya No problem, and if you need anything, let me know!
d0zza Posted March 7, 2018 Posted March 7, 2018 If you're wondering how to get the widget ids/strings you need use the widget debugger in osbot settings.