Advertisement
182days

AutoAvailable 1.3 (GUI)

Dec 5th, 2023 (edited)
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.09 KB | None | 0 0
  1. import time
  2. import threading
  3. from tkinter import *
  4. import pyautogui
  5. import random
  6. import keyboard
  7.  
  8. root = Tk()
  9. root.title("AutoAvailable 1.3")
  10. root.geometry("180x170")
  11. root.resizable(False, False)
  12.  
  13. time.sleep(0.5)
  14. stop = False
  15.  
  16. def button_stop_command():
  17.   global stop
  18.   stop = True
  19.  
  20. def button_start_command():
  21.   global stop
  22.   stop = False
  23.   time.sleep(2)
  24.   pyautogui.hotkey('win', 'd')
  25.   while True and not stop:
  26.     MouseX = random.randint(0, 1300)
  27.     MouseY = random.randint(0, 700)
  28.     MouseSleep = random.randint(10, 60)
  29.     pyautogui.moveTo(MouseX, MouseY, duration=1)
  30.     pyautogui.click()
  31.     time.sleep(MouseSleep)
  32.    
  33. def button_starter():
  34.   t = threading.Thread(target=button_start_command)
  35.   t.start()
  36.  
  37. label = Label(root, text="AutoAvailable Utility\nAll Windows are minimised\nUse the controls below")
  38. label.pack(pady=10)
  39.  
  40. button_start = Button(root, text="START", command=button_starter, width = 15)
  41. button_start.pack(pady=10)
  42.  
  43. button_stop = Button(root, text="STOP", command=button_stop_command, width = 15)
  44. button_stop.pack(pady=10)
  45.  
  46. root.mainloop()
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement