Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to detect either up or down mouse wheel scrolling? #120

Open
YuATools opened this issue Aug 11, 2022 · 0 comments
Open

Is there a way to detect either up or down mouse wheel scrolling? #120

YuATools opened this issue Aug 11, 2022 · 0 comments

Comments

@YuATools
Copy link

I am writing a script that needs to be triggered by each scroll up and down.

mode = int(mode)
if mode == 1:
    a_key = 1
    b_key = #scroll down
elif mode == 2:
    a_key = -1
    b_key = #scroll up
else:
    sys.exit()

while True:
    if keyboard.is_pressed(key)
        while a < 30:
            mouse.wheel(a_key)
            time.sleep(1)
    if |**scroll detect**| (b_key)
        while a < 30:
            mouse.wheel(a_key)
            time.sleep(1)

The full script looks like this
I want to detect the top and bottom at this "Scroll detect" part.
Since it is not allowed to scroll in the same direction as a_key, we can use other modules than the mouse module, but we prefer the mouse module as much as possible.
Please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant