Joseph Posted July 8, 2014 Share Posted July 8, 2014 i want to know a way to interact with a rectangle, with a certain action. Link to comment Share on other sites More sharing options...
Jack Posted July 8, 2014 Share Posted July 8, 2014 right click the rectangle and use the methods to get the open menu. cycle through all options and interact with the one you want. Link to comment Share on other sites More sharing options...
Joseph Posted July 8, 2014 Author Share Posted July 8, 2014 right click the rectangle and use the methods to get the open menu. cycle through all options and interact with the one you want. but the menu class d0esnt have an interact method Link to comment Share on other sites More sharing options...
Swizzbeat Posted July 8, 2014 Share Posted July 8, 2014 (edited) public boolean selectMenuOption(String option) { if (sI.menu.isOpen()) { List<Option> options = sI.menu.getMenu(); for (int i = 0; i < options.size(); i++) { if (options.get(i).action.equalsIgnoreCase(option)) { return sI.mouse.click(new RectangleDestination(sI.bot, sI.menu.getX(), sI.menu.getY() + 20 + (i * 15), sI.menu.getWidth(), 15)); } } } return false; } Edited July 8, 2014 by Swizzbeat 2 Link to comment Share on other sites More sharing options...
Joseph Posted July 8, 2014 Author Share Posted July 8, 2014 public boolean selectMenuOption(String option) { if (sI.menu.isOpen()) { List<Option> options = sI.menu.getMenu(); for (int i = 0; i < options.size(); i++) { if (options.get(i).action.equalsIgnoreCase(option)) { return sI.mouse.click(new RectangleDestination(sI.bot, sI.menu.getX(), sI.menu.getY() + 20 + (i * 15), sI.menu.getWidth(), 15)); } } } return false; } swizz came to save the day, thanks for this. its too late for me to actually try to create this method 1 Link to comment Share on other sites More sharing options...