Пример #1
0
 public static int getIndex(String action) {
   if (!isOpen()) return -1;
   try {
     for (int x = 0; x < getHeight(getBounds().height); x++) {
       Rectangle rect1 = getRect(x + 1);
       String text =
           RSText.findString(new Color(160, 152, 123), rect1, RSText.FontTypes.UpCharsEx);
       if (text.contains(action)) return x + 1;
     }
   } catch (Exception ignored) {
   }
   return -1;
 }
Пример #2
0
 public static String getText(int index, Color color) {
   Rectangle rect = getRect(index);
   return RSText.findString(color, rect, RSText.FontTypes.UpCharsEx);
 }