Search code examples
pythonpyautoguiauto

Use pyautogui to click on-Screen board but no response


I try to use pyautogui to click on-Screen board but no response

below is my code

I try to open on-screen board in admin too. but when I run the code, mouse just move there and do nothing. And I dont know why..

    pyautogui.moveTo(400,510)
    pyautogui.mouseDown()
    time.sleep(2)
    pyautogui.mouseUp()
    time.sleep(2)

Solution

  • you need to go to on screen keyboard 'Options' button and click. open a new menu and then click on 'Hover over keys' and change 'Hover duretion' in shorter and press 'OK'.

    Now when you use pyautogui.moveTo(X,Y) to any key on 'on screen keyboard'

    then after 0.5 second automatic clicked.

    Thank you