Thread: Fix mouse clicking in java 9

Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 71
  1. #51  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,253
    Thanks given
    1,145
    Thanks received
    909
    Rep Power
    2081
    Anyone collected data on java versions in the scene recently ?
    Reply With Quote  
     

  2. #52  
    Registered Member
    Join Date
    Nov 2020
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by StanDev View Post
    Java 9 introduced a few bugs in the ancient client engine most people use, the most noticeable one is right mouse clicking.

    Go to the class where you handle your mouse clicking, usually in RSApplet.java.

    Search for this:
    Code:
     
    if (type == 2) {
    			mouseWheelDown = true;
    			mouseWheelX = i;
    			mouseWheelY = j;
    			return;
    		}
    replace the if statement with:
    Code:
    if (SwingUtilities.isMiddleMouseButton(e)) {
    Note that the argument of the method (e) is the MouseEvent object reference, this might be named differently in your client.

    Then search for:
    Code:
    		if (mouseevent.isMetaDown()) {
    			clickMode1 = 2;
    			clickMode2 = 2;
    		}
    Replace the first if statement with:
    Code:
    	if(SwingUtilities.isRightMouseButton(e)) {
    Then also in the following else block:
    Code:
    	} else {
    			clickMode1 = 1;
    			clickMode2 = 1;
    		}
    replace the else line with:
    Code:
    	} else if(SwingUtilities.isLeftMouseButton(e)){
    As pointed out by Jire, it is better to do it this way:
    friend, can you copy the entire script from the button? please, i tried anyway, looked at all the comments from page 1 to page 19 and i can't solve this problem with the right button, please man, or try to send me by email: [email protected]
    Reply With Quote  
     

  3. #53  
    Super Donator

    StanDev's Avatar
    Join Date
    Apr 2014
    Posts
    660
    Thanks given
    82
    Thanks received
    255
    Rep Power
    592
    Quote Originally Posted by Caio Estevan View Post
    friend, can you copy the entire script from the button? please, i tried anyway, looked at all the comments from page 1 to page 19 and i can't solve this problem with the right button, please man, or try to send me by email: [email protected]
    Add me on discord friend, and I will fix for u sir.
    StanDev#0990
    Reply With Quote  
     

  4. #54  
    Registered Member
    Join Date
    Nov 2020
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thanks so much! Right clicking is fixed :-D
    Reply With Quote  
     

  5. #55  
    Registered Member
    Join Date
    Jan 2021
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thank you so much I got it finally fixed
    Reply With Quote  
     

  6. #56  
    Registered Member
    Join Date
    Nov 2019
    Posts
    29
    Thanks given
    6
    Thanks received
    1
    Rep Power
    11
    Thanks!
    Reply With Quote  
     

  7. #57  
    Registered Member
    Join Date
    Feb 2021
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    could do this as well...

    if (type == 2) {
    mouseWheelDown = true;
    mouseWheelX = x;
    mouseWheelY = y;
    return;
    }
    if (type == 3) {
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    } else if (type == 1) {
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    }
    }
    Reply With Quote  
     

  8. #58  
    Registered Member XI magicka IX's Avatar
    Join Date
    Aug 2013
    Posts
    56
    Thanks given
    18
    Thanks received
    2
    Rep Power
    11
    sorry for gravedigging but still having issues




    how my code looks


    if (type == 2) {
    mouseWheelDown = true;
    mouseWheelX = x;
    mouseWheelY = y;
    return;
    }
    if (type == 3) {
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    } else if (type == 1) {
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    Reply With Quote  
     

  9. #59  
    Banned


    Join Date
    Jul 2020
    Posts
    157
    Thanks given
    100
    Thanks received
    166
    Rep Power
    0
    Quote Originally Posted by XI magicka IX View Post
    sorry for gravedigging but still having issues




    how my code looks


    if (type == 2) {
    mouseWheelDown = true;
    mouseWheelX = x;
    mouseWheelY = y;
    return;
    }
    if (type == 3) {
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    } else if (type == 1) {
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    Code:
    if (SwingUtilities.isMiddleMouseButton(mouseevent)) {
    			mouseWheelDown = true;
    			mouseWheelX = x;
    			client.mouseWheelY = y;
    			return;
    		}
    		if (SwingUtilities.isRightMouseButton(mouseevent)) {
    			clickType = client.RIGHT;
    			clickMode1 = 2;
    			clickMode2 = 2;
    		} else if (SwingUtilities.isLeftMouseButton(mouseevent)) {
    			clickType = client.LEFT;
    		        clickMode1 = 1;
    			clickMode2 = 1;
    		}
    Reply With Quote  
     

  10. #60  
    Registered Member
    Join Date
    May 2021
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Can i still get some help with the left right click?
    Reply With Quote  
     

Page 6 of 8 FirstFirst ... 45678 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [667/7**] How to fix right click bug in PvP
    By Zach in forum Tutorials
    Replies: 5
    Last Post: 06-30-2014, 05:06 PM
  2. Fix another bug in pickuping! + Video
    By Pkitten in forum Tutorials
    Replies: 59
    Last Post: 05-27-2008, 12:17 PM
  3. PKScapeX is recruiting a MySQL in Java developer
    By Stanyer in forum RS2 Server
    Replies: 7
    Last Post: 01-09-2008, 02:22 AM
  4. How to Make objects give you in item when you click in them!
    By black-pure-4-lyfe in forum Tutorials
    Replies: 3
    Last Post: 08-28-2007, 09:35 AM
  5. Fixing Logout Glitch in WhiteScape
    By Santa Noobie in forum Tutorials
    Replies: 2
    Last Post: 05-29-2007, 10:58 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •