Home>

and so, there is a library mouseit has mouse.double_click (button= 'left') but it doesn't work on ubuntu, that is, I run the python file with sudo, but it doesn't click

import mouse as ms
import keyboard as k
from time import sleep
while True:
    if ms.is_pressed (button= 'left') and not k.is_pressed ("shift"):
        clicked= 0
        while True:
            sleep (0.01)
            ms.double_click (button= "left")
            clicked += 1
            print (f "{w} ckicked!")
            if not ms.is_pressed (button= 'left'):
                break

if ms.is_pressed (button= 'left') ?????

Эникейщик2021-11-25 06:48:56

well, I did import mouse as ms @ Enikeyschik

Кзлч Вв2021-11-25 06:50:20

in plan, if the left button is pressed, then he clicks, if released, he does not click

Кзлч Вв2021-11-25 06:50:58

But how can you click if the button is held down?

Эникейщик2021-11-25 06:53:45

I'll try to remove it

Кзлч Вв2021-11-25 06:55:08