Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import win32gui, win32api, win32con, random
- from time import sleep as s
- from os import system as cmd
- window = win32gui.GetForegroundWindow()
- def minimize():
- win32gui.ShowWindow(window, win32con.SW_MINIMIZE)
- def restore():
- win32gui.ShowWindow(window, win32con.SW_RESTORE)
- methods=[-1,0,1]
- def move(x,y):
- win32api.SetCursorPos((x,y))
- def clickme(amount=100,time=0.02,multiple=1):
- for i in range(amount):
- value1,value2 = random.choice(methods),random.choice(methods)
- move(win32gui.GetCursorPos()[0]+value1*multiple,win32gui.GetCursorPos()[1]+value2*multiple)
- s(time)
- def start(timew8=1):
- print "Mouse fidget version 1\n\n"
- amounts = raw_input("\n\nPlease enter desired: amount/time/multiple with a comma LIKE THIS:\n\n\t\t100,0.02,1\n\n(These are defaults leave blank for these.)\n\n")
- if amounts != "":
- amt = amounts.split(',')
- a5 = int(amt[0])
- if '.' in amt[1]:
- a6 = float(amt[1])
- else:
- a6 = int(amt[1]) #allowing floats and ints
- a7 = int(amt[2])
- else:
- a5 = 100
- a6 = 0.02
- a7 = 1
- print("\nWill now fuck with your mouse.\n")
- cmd("pause")
- minimize()
- clickme(a5,a6,a7)
- restore()
- print "\n\nOperation complete.\n"
- cmd("pause")
- cmd("cls")
- start()
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement