Jump to content

Overwriting the mouse handler


Recommended Posts

Posted
24 minutes ago, Khaleesi said:

Uhm what exactly is the issue? Never heard about this

Let's say your script is dropping your inventory and you press Stop / Pause and your mouse is now on the client and the mouse is being pressed down the item gets dragged towards wherever your mouse is and glitches out

Posted (edited)
4 minutes ago, faketesco said:

Let's say your script is dropping your inventory and you press Stop / Pause and your mouse is now on the client and the mouse is being pressed down the item gets dragged towards wherever your mouse is and glitches out

well that's normal, shift is press before starting to drop and up when stops with dropping. if you stop the script midway it will never come in the piece of code to keyup, same for mouse buttons

Edited by Khaleesi
Posted
9 minutes ago, Khaleesi said:

well that's normal, shift is press before starting to drop and up when stops with dropping. if you stop the script midway it will never come in the piece of code to keyup, same for mouse buttons

that's why I want a defer so if the script is stopped then it calls keyup before exit/ pause

Posted
1 minute ago, Khaleesi said:

Or just click yourself on the key? I don't see the issue tbh.... 
or simply don't stop it while middropping or dragging items?

the issue is the script is constantly doing actions that cause this bug so I can't just stop it at a certain time when 99% of the time it's running it causes this issue.

Pressing a key / mouse button when the onloop is <50ms is difficult because I need to be some 0.1 tick nerd to successfully prevent this every time.

 

Do you know how to check ismousepressed / keypressed so I can run this onExit or on pause?

I thought about just releasing every key and mouseclick but if this data is submitted to runescape's side then that might be a pattern I don't want to keep sending

 

  • Like 1
Posted
42 minutes ago, faketesco said:

the issue is the script is constantly doing actions that cause this bug so I can't just stop it at a certain time when 99% of the time it's running it causes this issue.

Pressing a key / mouse button when the onloop is <50ms is difficult because I need to be some 0.1 tick nerd to successfully prevent this every time.

 

Do you know how to check ismousepressed / keypressed so I can run this onExit or on pause?

I thought about just releasing every key and mouseclick but if this data is submitted to runescape's side then that might be a pattern I don't want to keep sending

 

https://osbot.org/api/org/osbot/rs07/input/mouse/BotMouseListener.html

https://osbot.org/api/org/osbot/rs07/input/keyboard/BotKeyListener.html

  • Like 2
Posted
22 hours ago, Malcolm said:

You can probably do something onExit(); for this if you really wanted to.

Yeah I thought about that for stop but currently to check if paused I have a separate thread checking to see if the onloop is updating a variable, do you know of a default method similar to onExit() like onPause? or something like that

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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