Delivery Posted May 25, 2023 Share Posted May 25, 2023 Is it possible to make sure that each keydown has a defer for keyup? When I stop / pause scripts it holds and drags an item and bugs out when I am trying to use the bot account Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 25, 2023 Share Posted May 25, 2023 3 hours ago, faketesco said: Is it possible to make sure that each keydown has a defer for keyup? When I stop / pause scripts it holds and drags an item and bugs out when I am trying to use the bot account Uhm what exactly is the issue? Never heard about this Quote Link to comment Share on other sites More sharing options...
Delivery Posted May 25, 2023 Author Share Posted May 25, 2023 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 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 25, 2023 Share Posted May 25, 2023 (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 May 25, 2023 by Khaleesi Quote Link to comment Share on other sites More sharing options...
Delivery Posted May 25, 2023 Author Share Posted May 25, 2023 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 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 25, 2023 Share Posted May 25, 2023 (edited) 4 minutes ago, faketesco said: that's why I want a defer so if the script is stopped then it calls keyup before exit/ pause 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? Edited May 25, 2023 by Khaleesi Quote Link to comment Share on other sites More sharing options...
Delivery Posted May 25, 2023 Author Share Posted May 25, 2023 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 1 Quote Link to comment Share on other sites More sharing options...
Chris Posted May 25, 2023 Share Posted May 25, 2023 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 2 Quote Link to comment Share on other sites More sharing options...
Malcolm Posted May 26, 2023 Share Posted May 26, 2023 You can probably do something onExit(); for this if you really wanted to. Quote Link to comment Share on other sites More sharing options...
Delivery Posted May 27, 2023 Author Share Posted May 27, 2023 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 Quote Link to comment Share on other sites More sharing options...