[Python] I was trying to make a autoclicker using python but It raised a error and never...

Discussão em 'Python' iniciado por Stack, Março 15, 2025.

  1. Stack

    Stack Membro Participativo

    here is the output which is still running meaning it's not clicking: choose how many clicks you want the autoclicker to click at once>5 PRESS 's' TO START THE AUTOCLICKER AND 'q' TO QUIT. starting autoclicker... sqQUITING AUTOCLICKER starting autoclicker... and there was a error but it got cleared

    import keyboard as kb

    import pyautogui as pyg

    def click(click):
    if click == str:
    click = int(input("Please enter a valid number: "))
    elif click == int:
    pyg.click(click) #this should make it click as many times I want //as much as the param is


    clicks = int(input("choose how many clicks you want the autoclicker to click at once>"))

    def start_autoclicker():
    print("PRESS 's' TO START THE AUTOCLICKER AND 'q' TO QUIT.")
    while True:
    if kb.is_pressed("s"):
    print("starting autoclicker...")
    while True:
    click(clicks)
    if kb.is_pressed('q'):
    print("QUITING AUTOCLICKER")
    break
    start_autoclicker()



    First I was intending to make it ask how many times you want the autoclicker to click at once

    then I defined that clicking part using pyautogui.click(clicks)

    then I defined to start the autoclicking in a while loop if that makes since

    Continue reading...

Compartilhe esta Página