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.

Implementing mouse presses?

Featured Replies

NQbipgp.png

I have everything, I think. How do I get the keys pressed to log "doing shit". Nothing happens currently when I run it.

Do you see that keyevent use the argument to know when the key has been pressed

You talk about mouse pressed title. But in the op it talks about key pressed

Edited by josedpay

  • Author

Do you see that keyevent use the argument to know when the key has been pressed

You talk about mouse pressed title. But in the op it talks about key pressed

I meant keyListener

 

Did you register this as a new listener?

That is literally everything in my code.

I meant keyListener

That is literally everything in my code.

You need to register the listener to your script. Right now you basically made it but didn't attach it to anything.

  • Author

You need to register the listener to your script. Right now you basically made it but didn't attach it to anything.

How do you do that?

You need to register the listener to your script. Right now you basically made it but didn't attach it to anything.

I don't see anything to add key listener.

Op I do know in keyboard class you can grab the key Listener class.so use that instance to do want you need


getBot().getCanvas().addKeyListener(new KeyListener() {

@Override

public void keyTyped(KeyEvent e) {

}

@Override

public void keyReleased(KeyEvent e) {

}

@Override

public void keyPressed(KeyEvent e) {

}

});

getBot().getCanvas().addKeyListener(new KeyListener() {						@Override			public void keyTyped(KeyEvent e) {							}						@Override			public void keyReleased(KeyEvent e) {							}						@Override			public void keyPressed(KeyEvent e) {							}		});

Oh nice op seeing as you already implemented the interface. Just do in the onStart getBot().getCanvas().addKeyListener(this);

Edited by josedpay

getBot().getCanvas().addKeyListener(new KeyListener() {						@Override			public void keyTyped(KeyEvent e) {							}						@Override			public void keyReleased(KeyEvent e) {							}						@Override			public void keyPressed(KeyEvent e) {							}		});

Thanks, I paseed tf out l0l

  • Author
getBot().getCanvas().addKeyListener(new KeyListener() {
			
			@Override
			public void keyTyped(KeyEvent e) {
				
			}
			
			@Override
			public void keyReleased(KeyEvent e) {
				
			}
			
			@Override
			public void keyPressed(KeyEvent e) {
				
			}
		});

Exactly what I needed. Thank you.

Create an account or sign in to comment

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.