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.

show/hide paint problem

Featured Replies

Ok so I've got this  somewhere in my script:

 

    boolean showPaint=true;
    
    public void mousePressed(MouseEvent e) {
    Rectangle hideButton = new Rectangle(473,346,41,32);
        if(hideButton.contains(e.getPoint())) {
        showPaint = !showPaint;
        }
     }
 
and in my onPaint there is this:
 
if(showPaint){
     //paint stuff
}else{
     //something else
}
 
But that doesnt work.
Do i have to put the method mousePressed(MouseEvent e) somewhere else? cuz i've no clue what to do.
 
 

 

Ok so I've got this  somewhere in my script:

 

    boolean showPaint=true;
    
    public void mousePressed(MouseEvent e) {
    Rectangle hideButton = new Rectangle(473,346,41,32);
        if(hideButton.contains(e.getPoint())) {
        showPaint = !showPaint;
        }
     }
 
and in my onPaint there is this:
 
if(showPaint){
     //paint stuff
}else{
     //something else
}
 
But that doesnt work.
Do i have to put the method mousePressed(MouseEvent e) somewhere else? cuz i've no clue what to do.

 

 

put a log inside of your event and see if it registers the mouse press. This is how you should start debugging. Start at a high level and work your way down seeing what works and what doesnt.

  • Author

put a log inside of your event and see if it registers the mouse press. This is how you should start debugging. Start at a high level and work your way down seeing what works and what doesnt.

 

doesnt register, as expected

  • Author

What mouse event are you using. 

 

Did you override the client mouse event and or register a new listener?

 

all i have is what i posted + some imported thingy's:

 

import java.awt.event.MouseEvent;

import java.awt.event.MouseListener; //it says is not used

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.