Answers for "how to make a button spammer in python"

1

how to make a button spammer in python

import time
import keyboard # pip install keyboard

# Start of script
start_timer = input("How long would you like the start timer to be? In seconds please ")
space_between_spam = input("How long would you like the space between each keystroke? In seconds please ")
pressed_key = input("What key do you want to spam? ")

# Crash Prevention
key_crash_stopper = pressed_key.split()
len_crash = len(key_crash_stopper)
substring = input("One more time, please ")
count = pressed_key.count(substring)
if pressed_key == substring:
    print("To stop, press 's'")
    print("starting in", start_timer, "Seconds")
    time.sleep(int(start_timer))
    while True:
        keyboard.press(pressed_key)
        time.sleep(float(space_between_spam))
else:
    print("Please type the same letters!")

if count != 1:
    print("Only one letter!")
    exit()

if len_crash > 1:
    print("Only one letter!")
    exit()
Posted by: Guest on February-26-2021
1

how to make a button spammer in python

import time
import keyboard

# Start of script
start_timer = input("How long would you like the start timer to be? In seconds please ")
space_between_spam = input("How long would you like the space between each keystroke? In seconds please ")
pressed_key = input("What key do you want to spam? ")

# Crash Prevention
key_crash_stopper = pressed_key.split()
len_crash = len(key_crash_stopper)
substring = input("One more time, please ")
count = pressed_key.count(substring)
if pressed_key == substring:
    print("To stop, press 's'")
    print("starting in", start_timer, "Seconds")
    time.sleep(int(start_timer))
    while True:
        keyboard.press(pressed_key)
        time.sleep(float(space_between_spam))
else:
    print("Please type the same letters!")

if count != 1:
    print("Only one letter!")
    exit()

if len_crash > 1:
    print("Only one letter!")
    exit()
Posted by: Guest on February-26-2021

Code answers related to "how to make a button spammer in python"

Python Answers by Framework

Browse Popular Code Answers by Language