Jump to content

when mouse is clicked?


Rawrstin

Recommended Posts

Add this to your onStart() method

	bot.addMouseListener(new MouseListener() {

	    @Override
	    public void mouseReleased(MouseEvent e) {

	    }

	    @Override
	    public void mousePressed(MouseEvent e) {
		
	    }

	    @Override
	    public void mouseExited(MouseEvent e) {

	    }

	    @Override
	    public void mouseEntered(MouseEvent e) {

	    }

	    @Override
	    public void mouseClicked(MouseEvent e) {
		
	    }
	});
  • Like 1
Link to comment
Share on other sites

 

not quite sure what I'm doing wrong here..

 

 

 

	bot.addMouseListener(new MouseListener() {

	    @Override
	    public void mouseReleased(MouseEvent e) {

	    }

	    @Override
	    public void mousePressed(MouseEvent e) {
		
	    }

	    @Override
	    public void mouseExited(MouseEvent e) {

	    }

	    @Override
	    public void mouseEntered(MouseEvent e) {

	    }

	    @Override
	    public void mouseClicked(MouseEvent e) {
		
	    }
	});

 

 

If you just want to capture the users' mouse click you can use the MouseAdapter class

 

(Add this to onStart())

getBot().addMouseListener(new MouseAdapter() {
    @Override
    public void mouseClicked(MouseEvent e) {
        super.mouseClicked(e);
        // do whatever you want to do when the user clicks the mouse
    }
});
Edited by Explv
  • Like 1
Link to comment
Share on other sites

 

Add this to your onStart() method

	bot.addMouseListener(new MouseListener() {

	    @Override
	    public void mouseReleased(MouseEvent e) {

	    }

	    @Override
	    public void mousePressed(MouseEvent e) {
		
	    }

	    @Override
	    public void mouseExited(MouseEvent e) {

	    }

	    @Override
	    public void mouseEntered(MouseEvent e) {

	    }

	    @Override
	    public void mouseClicked(MouseEvent e) {
		
	    }
	});

 

Thanks much! ^.^

 

 

If you just want to capture the users' mouse click you can use the MouseAdapter class

 

(Add this to onStart())

getBot().addMouseListener(new MouseAdapter() {
    @Override
    public void mouseClicked(MouseEvent e) {
        super.mouseClicked(e);
        // do whatever you want to do when the user clicks the mouse
    }
});

 

You're the man, so just to get this straight.. Listener looks for bot 'onClick', while the Adapter handles the humans 'onClick'?

Link to comment
Share on other sites

There's currently no clean method to track bot clicks.

 

 

Alright, coolio!

Thanks Khal~

 

I haven't actually tested this out, but this may work for tracking clicks made by the bot:

getBot().addMouseListener(new BotMouseListener() {
    @Override
    public boolean blockInput(Point point) {
        return false;
    }

    @Override
    public void mouseClicked(MouseEvent e) {

    }

    @Override
    public void mousePressed(MouseEvent e) {

    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
});
Link to comment
Share on other sites

 

I haven't actually tested this out, but this may work for tracking clicks made by the bot:

getBot().addMouseListener(new BotMouseListener() {
    @Override
    public boolean blockInput(Point point) {
        return false;
    }

    @Override
    public void mouseClicked(MouseEvent e) {

    }

    @Override
    public void mousePressed(MouseEvent e) {

    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
});

 

nope

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...