Jump to content

Friends chat, names are always loaded, how to determine if a name is visible on the screen


Recommended Posts

Posted

Haven't tested this but this should work. You could change the name in nameWidget to whatever you were searching for.

RS2Widget nameWidget = getWidgets().getWidgetContainingText("name");
        
if (nameWidget != null && nameWidget.isVisible()) {
	nameWidget.hover();
}

 

  • Like 1
Posted
15 hours ago, Lunar said:

Haven't tested this but this should work. You could change the name in nameWidget to whatever you were searching for.

RS2Widget nameWidget = getWidgets().getWidgetContainingText("name");
        
if (nameWidget != null && nameWidget.isVisible()) {
	nameWidget.hover();
}

 

Unfortunately this doesn't work

15 hours ago, Lunar said:

Haven't tested this but this should work. You could change the name in nameWidget to whatever you were searching for.

RS2Widget nameWidget = getWidgets().getWidgetContainingText("name");
        
if (nameWidget != null && nameWidget.isVisible()) {
	nameWidget.hover();
}

 

This will always be true since the widget is always visible, even if it is not

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...