Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting text of what you are hovering over

Featured Replies

I've got this thing and it's bugging me like crazy.    

In RS in the top left part of the screen, there's text. It shows you what you have your mosue over. Either Walk here, Eat <item>, attack <player/npc> etc.

I need to get that text.        

I thought it was a widget so I tried to pull it with;

private final MethodProvider M;
public WidgetViewer(MethodProvider m){
	M = m;
		
}
	
public void getAction(){
	RS2Widget w =M.getWidgets().getWidgetContainingText("Walk here");
	if(w != null){
		M..log("Root id: "+w.getRootId());
	}else{
		M.log("Widget null");
		
	}
}
	

But this always returns Null. I can't seem to locate the widget IDs using the debug tools either.      

So my next option was to pull the canvis, get the component and read the text inside of it;

M.getBot().getCanvas().getComponentAt(13,13).getName();

returns "Canvas0".

 

When I pull the component's boundry with:

Canvas c = M.getBot().getCanvas();
Component component = c.getComponentAt(13,13);
Bounds b = component.getBounds();
int x = b.getMixX;
int y = b.getMaxY;

M.log("X: "+x+" Y: "+y);

I get:

x: 0 y: 513, so it's pulling the main screen window minus the minimap/inventory and chatbox.        

     

Is there any way to read the contents of that string?

Edited by Zappster

  • Author
4 minutes ago, Alek said:

What the actual f***. Menu.getTooltip() or Menu.getMenu()[0] :) 

Thank you so much!

Menu.getMenu().get(0); is what did it for me.

  • Alek locked this topic
Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.