Joseph Posted July 8, 2014 Posted July 8, 2014 i want to know a way to interact with a rectangle, with a certain action.
Jack Posted July 8, 2014 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.
Joseph Posted July 8, 2014 Author 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
Swizzbeat Posted July 8, 2014 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
Joseph Posted July 8, 2014 Author 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