twiztid4life Posted March 19, 2014 Share Posted March 19, 2014 (edited) I cant for the life of my figure out how to manually select a menu option. I can get the menu options but how do i move the mouse to the correct option that i want Edit: I think im on the right track now I get the list of options figure out what position the option is at based on the action i want to do move the mouse down based on the position of the action Edited March 19, 2014 by twiztid4life Link to comment Share on other sites More sharing options...
ahlaobby Posted March 19, 2014 Share Posted March 19, 2014 nah? Link to comment Share on other sites More sharing options...
Deffiliate Posted March 19, 2014 Share Posted March 19, 2014 (edited) Yeah, you had it figured out precisely. Here's a custom snippet (Credits go to Toph): public boolean selectMenuOption(String action, String noun) throws InterruptedException { if (!s.client.isMenuOpen()) return false; boolean found = false; int index = 0; List<Option> menu = s.client.getMenu(); for (; index < menu.size(); index++) { if (menu.get(index).action.equals(action) && menu.get(index).noun.contains(noun)) { found = true; break; } } if (found) { int x = s.client.getMenuX(); int y = s.client.getMenuY() + 21 + index * 14; return s.client.moveMouseTo(new RectangleDestination(x, y, s.client.getMenuWidth(), 10), false, true, false); } s.moveMouseOutsideScreen(); return false; } Edited March 19, 2014 by Deffiliate Link to comment Share on other sites More sharing options...
twiztid4life Posted March 19, 2014 Author Share Posted March 19, 2014 Thanks that's exactly where I was heading Link to comment Share on other sites More sharing options...
FearMe Posted March 19, 2014 Share Posted March 19, 2014 Yeah, you had it figured out precisely. Here's a custom snippet (Credits go to Toph): public boolean selectMenuOption(String action, String noun) throws InterruptedException { if (!s.client.isMenuOpen()) return false; boolean found = false; int index = 0; List<Option> menu = s.client.getMenu(); for (; index < menu.size(); index++) { if (menu.get(index).action.equals(action) && menu.get(index).noun.contains(noun)) { found = true; break; } } if (found) { int x = s.client.getMenuX(); int y = s.client.getMenuY() + 21 + index * 14; return s.client.moveMouseTo(new RectangleDestination(x, y, s.client.getMenuWidth(), 10), false, true, false); } s.moveMouseOutsideScreen(); return false; } It's + 19 + index * 15 actually. 1 Link to comment Share on other sites More sharing options...