Skip 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.

Report Interface

Featured Replies

Hey Guys can someone help me with Report interface? 

how do i check if its open and Close it.

Thanks

Thats a good question 

 Honestly I suggest opening the interface debugger opening the Report window, and have a script check for a certain interface constantly (One that can only be found in the report screen) 
 Once this interface is Visible have the script run another method to close it. 

 

Unless there is a report menu in the API I haven't skimmed across one yet however.

  • Developer

Get the interface id of the report screen. Do this by clicking on the interface debugging, hover the mouse onto the interface and look at the parent. Then you simply do this:

if (client.getValidInterface()[parentId] && client.getInterfaces()[parentId] != null)    it's open
  • Author

Get the interface id of the report screen. Do this by clicking on the interface debugging, hover the mouse onto the interface and look at the parent. Then you simply do this:

 

if (client.getValidInterface()[parentId] && client.getInterfaces()[parentId] != null)    it's open

Thank You very much :) 

Would you also say how to make it click on a child?

  • Developer

We will add a feature to the next release that simply goes like:

 

child.click(..)

 

Or something along those lines. For now you will have to do it like this (or something along the lines, this is just pseudo code):

 

moveMouseTo(child.getRectangle(), other values for moveMouseTo)
  • Author

We will add a feature to the next release that simply goes like:

 

 

child.click(..)

 

Or something along those lines. For now you will have to do it like this (or something along the lines, this is just pseudo code):

 

 

moveMouseTo(child.getRectangle(), other values for moveMouseTo)

Aww i see im bad with interfaces :P So i would do child.getRectangle([iNTERFACECHILD HERE})??

BUMP BUMP BUMP Please help . Alot of people will need this too :)

This might be easier for you to work with:

	/**	 * Clicks the specified interface child component.	 * @param interfaceId the interface id.	 * @param childId the child component id.	 * @throws InterruptedException if another thread has interrupted the current thread.	 */	private void clickInterfaceComponent(int interfaceId, int childId) throws InterruptedException {		Rectangle childRectangle = client.getInterface(interfaceId).getChild(childId).getRectangle();		RectangleDestination destination = new RectangleDestination(childRectangle);				client.moveMouseTo(destination, false, true, false);	}

Edited by Xyssto

I actually needed this. and you can make a rectangle over the X button. and tell it to click on the rectangle to close it. If I figure it out I'll post the code here for you.

 

EDIT: Turns out it won't detect if the interface is open or not.

 

 

 

if (client.getValidInterfaces()[553] && client.getInterfaces()[553] != null) { 

It executes the command even if the interface is closed.

Edited by linkcg0

  • Author

This might be easier for you to work with:

	/**	 * Clicks the specified interface child component.	 * @param interfaceId the interface id.	 * @param childId the child component id.	 * @throws InterruptedException if another thread has interrupted the current thread.	 */	private void clickInterfaceComponent(int interfaceId, int childId) throws InterruptedException {		Rectangle childRectangle = client.getInterface(interfaceId).getChild(childId).getRectangle();		RectangleDestination destination = new RectangleDestination(childRectangle);				client.moveMouseTo(destination, false, true, false);	}

Where would i put that at?

parent id is 553

Child is 10

All i get is 

 

Error While executing Script
 
 
 i have this

 

	private void clickInterfaceComponent(int interfaceId, int childId) throws InterruptedException {	Rectangle childRectangle = client.getInterface(553).getChild(10).getRectangle();	RectangleDestination destination = new RectangleDestination(childRectangle);	}	 

 

 

 

	boolean randoms(){	if (client.getValidInterfaces()[553] && client.getInterfaces()[553] != null) {	client.moveMouseTo(destination, false, true, false);}			} 

 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.