Ayylmao420 Posted November 27, 2018 Share Posted November 27, 2018 List<RS2Widget> clickHereToContinueList = getWidgets().getAll().stream().filter(w -> w != null && w.isVisible() && w.getMessage() != null && w.getMessage().equals("Click here to continue")).collect(Collectors.toList()); if (clickHereToContinueList.isEmpty()) { log("empty"); } So this is what happens, when i run the script before entering the dialogue the list is empty as it should but as soon as i exit the dialogue the list isn't empty even though i'm not in dialogue anymore. I'm not storing the widget data anywhere else, this whole code is inside onLoop, can someone tell me what could cause this ? Also, i'm using osbot version 2.5.29, i can't use 2.5.27 as when i try to run it it says my osbot version is outdated. If anyone could try the above with 2.5.27 i'd greatly appreciate it. Quote Link to comment Share on other sites More sharing options...
Chris Posted November 28, 2018 Share Posted November 28, 2018 Quote when i try to run it it says my osbot version is outdated. If anyone could try the above with 2.5.27 i'd greatly appreciate it. we are on stable version 2.5.28.. Quote Link to comment Share on other sites More sharing options...
Administrator Maldesto Posted November 28, 2018 Administrator Share Posted November 28, 2018 Make sure to update your client! Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 28, 2018 Author Share Posted November 28, 2018 ah didn't notice 2.5.28 was out, anyways, i tried with 2.5.28 and i still have this issue Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 28, 2018 Author Share Posted November 28, 2018 (edited) List<RS2Widget> clickHereToContinueList = getWidgets().getAll().stream().filter(w -> w != null && w.isVisible() && w.getMessage() != null && w.getMessage().equals("Click here to continue")).collect(Collectors.toList()); if (!clickHereToContinueList.isEmpty()) { RS2Widget clickHereToContinue = clickHereToContinueList.get(0); g.draw(clickHereToContinue.getBounds()); } Even though Click here to continue is not there it, instead it's Please wait..., it thinks it's still there. Am i doing something wrong ? Edited November 28, 2018 by Ayylmao420 Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted November 28, 2018 Share Posted November 28, 2018 How often are you updating your variable? Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 28, 2018 Author Share Posted November 28, 2018 (edited) 10 minutes ago, HeyImJamie said: How often are you updating your variable? the main post code was inside onloop so it should be updating every single time onloop returns, the second code i posted was inside onpaint so yeah, it should update immediately but it isn't which is strange. Edited November 28, 2018 by Ayylmao420 Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted November 28, 2018 Share Posted November 28, 2018 7 minutes ago, Ayylmao420 said: the main post code was inside onloop so it should be updating every single time onloop returns, the second code i posted was inside onpaint so yeah, it should update immediately but it isn't which is strange. Just wondering if it never actually updates. What exactly are you using this for? Possibly a workaround. Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 28, 2018 Author Share Posted November 28, 2018 (edited) 9 minutes ago, HeyImJamie said: Just wondering if it never actually updates. What exactly are you using this for? Possibly a workaround. List<RS2Widget> clickHereToContinueList = getWidgets().getAll().stream().filter(w -> w != null && w.isVisible() && w.getMessage() != null && w.getMessage().equals("Click here to continue")).collect(Collectors.toList()); if (!clickHereToContinueList.isEmpty()) { RS2Widget clickHereToContinue = clickHereToContinueList.get(0); if (clickHereToContinue.interact("Continue")) { sleepUntil(() -> getWidgets().getAll().stream().filter(w -> w != null && w.isVisible() && w.getMessage() != null && w.getMessage().equals("Click here to continue")).collect(Collectors.toList()).isEmpty(), random(3000, 5000)); } } I'm clicking on Click here to continue, also notice the sleepUntil condition, it should be updating every 10ms but it still sleeps the full time because it still thinks the clickHereToContinue exists. I tried doing this: if (getDialogues().isPendingContinuation()) { if (getDialogues().clickContinue()) { sleepUntil(() -> !getDialogues().isPendingContinuation(), random(3000, 5000)); } } but this one too sleeps the full amount of time because it thinks it is still pending continuation. Edited November 28, 2018 by Ayylmao420 Quote Link to comment Share on other sites More sharing options...
NoxMerc Posted November 28, 2018 Share Posted November 28, 2018 (edited) The Gielinor Guide and all other Tutorial Island instructions widgets do not function correctly with the Dialogues API (unless we've both been attempting to use it incorrectly). You must implement your own method for continuation. You're also unnecessarily complicating your life with the widgets API. getWidgets().getWidgetContainingText(root, "Click here to continue") should suffice for you to get the single, visible widget containing that text. You might find Explv's open-source script helpful. https://github.com/Explv/Tutorial-Island/blob/master/src/sections/TutorialSection.java Edited November 28, 2018 by NoxMerc Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 28, 2018 Author Share Posted November 28, 2018 (edited) On 11/28/2018 at 8:18 AM, NoxMerc said: The Gielinor Guide and all other Tutorial Island instructions widgets do not function correctly with the Dialogues API (unless we've both been attempting to use it incorrectly). You must implement your own method for continuation. You're also unnecessarily complicating your life with the widgets API. getWidgets().getWidgetContainingText(root, "Click here to continue") should suffice for you to get the single, visible widget containing that text. You might find Explv's open-source script helpful. https://github.com/Explv/Tutorial-Island/blob/master/src/sections/TutorialSection.java thanks, i'll investigate Edit:// I tried getWidgets().getWidgetContainingText() but it still gives me the same result. Edited November 29, 2018 by Ayylmao420 Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 29, 2018 Author Share Posted November 29, 2018 My code works perfectly fine on another botting client yet it doesn't want to work on osbot, any ideas @Patrick Quote Link to comment Share on other sites More sharing options...
NoxMerc Posted November 30, 2018 Share Posted November 30, 2018 (edited) Not sure what your issue is with a lack of code. You've been given an open-source example of a working script for clicking ClickToContinue. What's the latest code you have that's not working? Edited November 30, 2018 by NoxMerc Quote Link to comment Share on other sites More sharing options...
NoxMerc Posted November 30, 2018 Share Posted November 30, 2018 (edited) *Duplicate, sorry Edited November 30, 2018 by NoxMerc *Duplicate, sorry Quote Link to comment Share on other sites More sharing options...
Ayylmao420 Posted November 30, 2018 Author Share Posted November 30, 2018 15 minutes ago, NoxMerc said: Not sure what your issue is with a lack of code. You've been given an open-source example of a working script for clicking ClickToContinue. What's the latest code you have that's not working? His works and so is mine but my question is why does the widget for both codes return true when the message clearly doesn't equal "Click here to continue" but actually "Please wait...". I tried filtering for "Please wait..." but osbot doesn't even find a widget with message like that even though another botting client that i tried it on does. Quote Link to comment Share on other sites More sharing options...