Comments (5)
Good find! I was wondering what was causing that.
I'll give this a more thorough look later in the day, but I am curious of one thing regarding shuffling the stop/start logic to the UI side.
OSBC allows you to test your scripts without the UI (see https://github.com/kelltom/OSRS-Bot-COLOR/wiki/Testing-a-Bot-Without-the-UI), and I have a feeling that moving the stop/start logic will render that.. messed up - for lack of a better term.
At the end of the day it's important to go with the cleanest solution, which of course I won't know until I have proper time to check this out. But if you happen to have time to look at what I mentioned and see what the side effects would be, that's definitely a place to start.
Thanks for contributing!
from os-bot-color.
I've made a branch here for the fix: https://github.com/kelltom/OSRS-Bot-COLOR/tree/Bot-control-keyboard-shortcut-improvements
I've actually managed to fix it with a simple workaround like this:
So after the play
function finishes, it'll automatically mark the key as released.
While it's a pretty lame solution, and could have some slightly weird behaviour if you hold the key (it starts/stops the bot quickly, once), I think it's better than taking the start/stop logic away from the Model side of the project. That would unfortunately lead to a bunch of other architecture-breaking workarounds down the road.
I think I'm going to change the keyboard shortcut as well, as there have been some complaints with Ctrl
.
Thanks for pointing this out! I honestly wouldn't have figured it out myself, so I appreciate it!
from os-bot-color.
#101 is the current set of changes
from os-bot-color.
I tested the workaround (with UI) and it works much better than before for sure. There are some instances where I needed to press twice to start, but overall it was more functional and had no side effects on the OS this time (CTRL key pressed down forever).
To really fix the root cause, maybe Window.initialize() can be done async, and the bot main loop can only start once the async function ends?
from os-bot-color.
Solved in #101
from os-bot-color.
Related Issues (20)
- [OSR-18] Add remote mouse option HOT 1
- [OSR-17] Add Window attribute for entire RuneLite window to allow right-clicking inventory items HOT 4
- [OSR-15] OCR fails when lines of text are too close together HOT 2
- [OSR-27] Add function to determine if color exists in Rectangle
- [OSR-28] Add "latest msg" features to Morg API utility HOT 1
- [OSR-29] Add Rectangle manipulation functions HOT 2
- [OSR-35] ValueError when using red_click_check in mouse.click HOT 3
- [OSR-38] Bot.stop() function does not work when called within script
- [OSR-39] Add "inventory full" check to Morg API
- [OSR-40] Improve Geometry constructors & sorting key functions
- [OSR-44] Make SpriteScraper use OSRS Wiki API
- [OSR-45] Profile Manager plugin interferes with game_launcher utility HOT 2
- [OSR-47] Swap PyAutoGUI for PyDirectInput HOT 3
- [OSR-48] Implement context manager for StatusSocket
- ERROR: unsupported argument text_font to the CTkLabel constructor from the customtkinter package.
- Stuck on this error, thank you in advance for any help HOT 2
- runelite_cv.py -> extract_objects() deduplication
- Jagex Launcher support HOT 3
- Some questions about the project HOT 2
- Old Discord Member - Request New Invite HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from os-bot-color.