Advertisement
Nuggetthe1

Untitled

May 30th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | Source Code | 0 0
  1. import tkinter as tk
  2.  
  3. def set_speed():
  4. try:
  5. speed = int(entry.get())
  6. if 1 <= speed <= 111:
  7. # Here you would put the code to change your speed
  8. print("Speed set to:", speed)
  9. else:
  10. print("Speed must be between 1 and 111")
  11. except ValueError:
  12. print("Please enter a valid number")
  13.  
  14. # Create the main window
  15. root = tk.Tk()
  16. root.title("Vantus Macro GUI")
  17.  
  18. # Create a label
  19. label = tk.Label(root, text="Enter your speed (1-111):")
  20. label.pack()
  21.  
  22. # Create an entry widget
  23. entry = tk.Entry(root)
  24. entry.pack()
  25.  
  26. # Create a button to set the speed
  27. button = tk.Button(root, text="Set Speed", command=set_speed)
  28. button.pack()
  29.  
  30. # Run the main event loop
  31. root.mainloop()
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement