SRL Archive - RS3 Help

Is there a function to close extra, settings and power interfaces?


Krotar

2015-03-22 14:47:02

Hello,

I have been browsing different scripts and the documentation for a method that checks if interfaces are overlaying the screen and if so closes it.
Does this not exist in the current documentation?

I have noticed that in my current script it will sometimes open the "extra" menu or "settings" menu.
My fail safe for this right now is that it relogs if it has been inactive for a while.

Next to this I have also noticed that when setting the login world to 141 I will get a notification saying this isn't a valid world. Worlds like 80 and 81 give no problems.

Regards,
Krotar

KeepBotting

2015-03-22 17:02:53

Check out iOak, there's a function in there called TRSMainScreen.closeAllInterfaces() that you can use.

You may have to create more DTMs, as I only wrote it to look for the Esc-menu's red "X" DTM and I'm not sure if there's more than one type of red "X"

If there is, you can create an array of DTMs and loop through it. I believe the function only searches in mainScreen.getBounds() so if you want to close interfaces whose red "X" appears outside the mainScreen, you'll want to change the search bounds to encompass the entire client.

yourule97

2015-03-22 17:20:15

I actually had this exact problem. Sometimes when Simba closes a bank screen, it presses esc one too many times, so I just added a failsafe like:

if options.isOpen() then multiType(VK_ESCAPE, randomRange(30, 50), 1);

Pretty much it just detects if the options menu is open and then presses escape to get rid of it.

The Mayor

2015-03-22 19:19:16

closePopup(); will work for most of the popups.