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;
}