Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- def set_speed():
- try:
- speed = int(entry.get())
- if 1 <= speed <= 111:
- # Here you would put the code to change your speed
- print("Speed set to:", speed)
- else:
- print("Speed must be between 1 and 111")
- except ValueError:
- print("Please enter a valid number")
- # Create the main window
- root = tk.Tk()
- root.title("Vantus Macro GUI")
- # Create a label
- label = tk.Label(root, text="Enter your speed (1-111):")
- label.pack()
- # Create an entry widget
- entry = tk.Entry(root)
- entry.pack()
- # Create a button to set the speed
- button = tk.Button(root, text="Set Speed", command=set_speed)
- button.pack()
- # Run the main event loop
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement