matiaspedelhez / msfs_mouse_yoke Goto Github PK
View Code? Open in Web Editor NEWFly using your mouse in Microsoft Flight Simulator.
License: MIT License
Fly using your mouse in Microsoft Flight Simulator.
License: MIT License
Describe the bug
"run.bat" - Doesn't work properly if your windows username consists of two words (Contains a space character).
To Reproduce
Steps to reproduce the behavior:
Run "run.bat" as an administrator on an account with a username that has a space character.
Expected behavior
The script is supposed to install prerequisites and then launch the .py file.
Screenshots
After adding a "pause" line in the script before the "exit /b 0" I get this:
Desktop specs (please complete the following information):
Additional context
My windows username is "Bruno Borges"
Describe the bug
Because of PyAutoGUI's failsafe feature, set by pyautogui.FAILSAFE, the script breaks when the user pushes towards the top-left corner of the screen.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The program should not break due to user input.
Screenshots
A generated error message:
2024-01-13 17:22:14,771 - Unhandled exception in listener callback
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pynput\_util\__init__.py", line 228, in inner
return f(self, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pynput\keyboard\_win32.py", line 290, in _process
self.on_release(key)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pynput\_util\__init__.py", line 144, in inner
if f(*args) is False:
File "C:\Users\User\Desktop\Academics\Projects\MouseYoke\msfs_mouse_yoke\mouse_yoke.py", line 79, in onKeyRelease
if active: moveTo(last_x_position, last_y_position)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 597, in wrapper
failSafeCheck()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pyautogui\__init__.py", line 1722, in failSafeCheck
raise FailSafeException(
pyautogui.FailSafeException: PyAutoGUI fail-safe triggered from mouse moving to a corner of the screen. To disable this fail-safe, set pyautogui.FAILSAFE to False. DISABLING FAIL-SAFE IS NOT RECOMMENDED.
Desktop specs (please complete the following information):
Is your feature request related to a problem? Please describe.
Usually, when the script is paused, the axes are still "pressed" on the last value they recorded. This was initially thought to facilitate the mid-flight switching between flying the aircraft and switching buttons inside the cockpit. And it does that, but the problem comes when you are navigating through the menus - As the axes are still recording some values, the game thinks that you want to navigate on the menus and it cycles between every button of the UI. Same happens when you are selecting an airport in the World Menu. The earth starts spinning around as the axes are still pressed.
Describe the solution you'd like
It would be great to have a "reset-axes" button to leave every axis on the center - or in their "default" value. That way, you can navigate through the menus without fighting with the false inputs that the script is dropping. This implementation could also help when setting up and calibrating the axes.
it wasnt running, i asked chat gpt why and it gave me this:
The script looks pretty solid at first glance, but I noticed a small typo that might be causing issues. In the following line:
echo Running mouse_yoke.py... >> "%LOGFILE%""
There's an extra double quote at the end. It should be:
echo Running mouse_yoke.py... >> "%LOGFILE%"
Remove that extra double quote, and it should be good to go.
Apart from that, if you're still encountering issues, it would be helpful to know what kind of problems or error messages you're getting. If there's a specific error or behavior you're trying to address, let me know, and we can troubleshoot it together! ๐ค๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.