- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
Latest commit
104 lines (83 loc) · 2.7 KB
/
Copy pathmain.py
File metadata and controls
104 lines (83 loc) · 2.7 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
importtime
importkeyboard
importctypes
importrandom
fromtkinterimport*
fromtkinterimportmessagebox
version="1.1"
started=0
defdeve():
messagebox.showinfo("PythonAutoClicker "+version, "Welcome to PythonAutoClicker "+version+"! \n If you need help on how to use this program open the README.MD! \n Programmed by Fexo! \n Github: Fexooo \n Twitter: @FexoYT \n Instagram: @F.exoo \n YouTube: Fexo")
defrun():
ekey=ek.get()
ckey=ck.get()
ecpsvar=ecps.get()
evs=evstart.get()
eve=evend.get()
speedfl=float(ecpsvar)
speedfi=float(1/speedfl)
ifkeyboard.is_pressed(ekey):
ctypes.windll.user32.mouse_event(2, 0, 0, 0, 0)
ctypes.windll.user32.mouse_event(4, 0, 0, 0, 0)
time.sleep(speedfi*random.uniform(float(evs), float(eve)))
root.after(0, run)
ifkeyboard.is_pressed(ckey):
root.destroy
exit()
root.after(1, run)
defstart():
print("Start!")
ekey=ek.get()
ckey=ck.get()
ecpsvar=ecps.get()
evs=evstart.get()
eve=evend.get()
ifekeyandckeyandecpsvar!="":
ifevsandeve!="":
lockentrys()
else:
messagebox.showerror("PythonAutoClicker "+version, "An Error has occured! Code: 2 \n Please make sure the Variation Values are set!")
else:
messagebox.showerror("PythonAutoClicker "+version, "An Error has occured! Code: 1 \n Please make sure the Activation, Close Key and CPS are set!")
root=Tk()
root.title("PythonAutoClicker "+version)
root.geometry("300x230")
root.iconbitmap("main.ico")
top=Frame(root)
top.pack()
mid=Frame(root)
mid.pack()
bot=Frame(root)
bot.pack(side=BOTTOM)
head=Label(top, text="PythonAutoClicker "+version)
head.config(font=("Arial", 20))
head.pack()
dev=Label(top, text="by Fexooo")
dev.config(font=("Arial", 10))
dev.pack()
Label(mid, text="CPS:").grid(row=0)
ecps=Entry(mid)
ecps.grid(row=0, column=1)
Label(mid, text="Activation Key:").grid(row=1)
ek=Entry(mid)
ek.grid(row=1, column=1)
Label(mid, text="Close Key:").grid(row=2)
ck=Entry(mid)
ck.grid(row=2, column=1)
Label(mid, text="Variation (1 for no Variation)").grid(row=4)
Label(mid, text="Start Value:").grid(row=5)
evstart=Entry(mid)
evstart.grid(row=5, column=1)
Label(mid, text="End Value:").grid(row=6)
evend=Entry(mid)
evend.grid(row=6, column=1)
start=Button(bot, command=start, text="Start").grid(row=1, column=0)
help=Button(bot, command=deve, text="Help").grid(row=1, column=1)
deflockentrys():
ek.config(state='disabled')
ck.config(state='disabled')
ecps.config(state='disabled')
evstart.config(state='disabled')
evend.config(state='disabled')
run()
root.mainloop()