-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoclicker.py
More file actions
46 lines (33 loc) · 929 Bytes
/
Copy pathautoclicker.py
File metadata and controls
46 lines (33 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Press f7 for start
# Press f8 for break
# mr_sajt author
import time
from tkinter.constants import ON
from typing import Text
import pyautogui as pg
from tkinter import *
import keyboard
window = Tk()
window.title("Autoclicker")
window.geometry("800x600")
def number():
try:
int(my_box.get())
answer.config(text="You can turn off with F8!")
for i in range(int(my_box.get())):
pg.click()
if keyboard.is_pressed("f8") == True:
answer.config(text="):")
break
except ValueError:
answer.config(text="ONLY NUMBER!")
my_label = Label(window, text="ENTER THE NUMBER OF CLICKS")
my_label.pack(pady=20)
my_box = Entry(window)
my_box.pack(pady=10)
my_button = Button(window, text="Start", command=number)
my_button.pack(pady=5)
answer = Label(window, text="")
answer.pack(pady=20)
window.mainloop()
time.sleep(5)