Jump to content

Overwriting the mouse handler


Delivery

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

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...