-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjumpppp.py
More file actions
65 lines (45 loc) · 1.26 KB
/
jumpppp.py
File metadata and controls
65 lines (45 loc) · 1.26 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
import pyautogui
import time
import tkinter as tk
def find_pos():
x,y=pyautogui.position()
print(f"the position is ({x},{y})")
def move_mouse():
x_pos=int(entry_x.get())
y_pos=int(entry_y.get())
pyautogui.moveTo(x_pos,y_pos)
def click_and_hold(duration):
#pyautogui.moveTo(1335,704)
move_mouse()
pyautogui.mouseDown()
time.sleep(duration)
pyautogui.mouseUp()
def digi():
newlength=float(entry.get())
new(newlength)
def new(a):
thetime=-0.00800896*(a-14.2091)**2+1.48245
click_and_hold(thetime)
#print(thetime)
root=tk.Tk()
root.geometry("400x250")
root.title("JUMP,JUMP,JUMP")
label_find=tk.Label(root,text="seek your mouse")
label_find.pack()
button_find=tk.Button(root,text="start to seek",command=find_pos)
button_find.pack()
label_pos=tk.Label(root,text="input the place (x,y) to click:")
label_pos.pack()
entry_x=tk.Entry(root)
entry_x.pack()
entry_y=tk.Entry(root)
entry_y.pack()
#button_pos=tk.Button(root,text="move the mouse",command=move_mouse)
#button_pos.pack()
label=tk.Label(root,text="input the length:")
label.pack()
entry=tk.Entry(root)
entry.pack()
button=tk.Button(root,text="click",command=digi)
button.pack()
root.mainloop()