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.

Move to exact screen position

Featured Replies

Hi guys I need help,

 

I noticed when I created a new RectangleDestination(int x,int y,int width,int height) from the osbot API

both width and height had to be 3px or more for the mouse to actually move to that position.

So therefore I cannot make a rectangle with 1px width, 1px height.

 

How can I let my mouse move to an exact given location on the screen?

 

Thanks in advance

  • Author

ok thanks, but how do I move my move to that position?

because the method moveMouse & moveMouseTo only accept a MouseDestination

and all MouseDestination's subclasses don't accept positions as their parameter except for MainScreenTileDestination wich I dont need.

 

btw I don't want a position ingame, I want to move to an inventory slot for example.. :s

Edited by redsub

ok thanks, but how do I move my move to that position?

because the method moveMouse & moveMouseTo only accept a MouseDestination

and all MouseDestination's subclasses don't accept positions as their parameter except for MainScreenTileDestination wich I dont need.

 

btw I don't want a position ingame, I want to move to an inventory slot for example.. :s

You can use client.getInventory().getDestinationForSlot(client.getInventory().getSlotForId/Name(...)) for that.

I'm surprised there isn't a #moveMouse(Point)  method though.

  • Author

You can use client.getInventory().getDestinationForSlot(client.getInventory().getSlotForId/Name(...)) for that.

I'm surprised there isn't a #moveMouse(Point)  method though.

This is not going to work as I want my mouse to move to an exact location, multiple times.

Thanks for your help, but  I still need help with this!

This is not going to work as I want my mouse to move to an exact location, multiple times.

Thanks for your help, but  I still need help with this!

I kinda expected that, hoped it might be sufficient.

 

I think you could do something like this though:

while(new RectangleDestination(new Rectangle(x, y, width, height)).getPointDestination() != new Point(x, y));

Edited by FearMe

  • Author

 

I kinda expected that, hoped it might be sufficient.

 

I think you could do something like this though:

while(new RectangleDestination(new Rectangle(x, y, width, height)).getPointDestination() != new Point(x, y));

this will only check if the point values are even, and then regardless executes the moveMouse method with the rectangle values :s

this will only check if the point values are even, and then regardless executes the moveMouse method with the rectangle values :s

Oh wow yeah, woops. I don't know anything that could fix this, I'm sorry.

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.