daily pastebin goal
58%
SHARE
TWEET

Untitled

RagingGam0r Feb 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '''
  2. from pynput.keyboard import Key, Controller
  3. import time
  4.  
  5. keyboard = Controller()
  6.  
  7. x=1
  8. while True:
  9.     time.sleep(5)
  10.     keyboard.type("m!mine")
  11.     keyboard.press(Key.enter)
  12.     time.sleep(5)
  13.     keyboard.type("m!mine")
  14.     keyboard.press(Key.enter)
  15.  
  16.  
  17. '''
  18. #stuff i was testing /\
  19. import sys
  20. from tkinter import *
  21. import tkinter as tk
  22. import time
  23. import threading  
  24. from pynput.keyboard import Key, Controller
  25. keyboard = Controller()
  26.  
  27.  
  28. switch = True  
  29. root = tk.Tk()
  30.  
  31. Y=0
  32.  
  33. X=0
  34.  
  35. Delay = 15
  36.  
  37. Delay2 = 15
  38.  
  39. def blink():  
  40.  def run():
  41.   global Delay
  42.   global inputValue
  43.   L=0
  44.   int_Delay = int(Delay)
  45.   int_Delay2 = int(Delay2)
  46.   print("Current ammount of loops:")
  47.   print(L)
  48.   while (switch == True):
  49.    print (int_Delay)
  50.    print("Delay2:",Delay2)
  51.    time.sleep(5.5)
  52.    keyboard.type("m!mine")
  53.    keyboard.press(Key.enter)
  54.    int_Delay=int_Delay-1
  55.    L=L+1
  56.    print("Current ammount of loops:")
  57.    print(L)
  58.    if int_Delay == 0:
  59.         print("Worked")
  60.         time.sleep(1)
  61.         keyboard.press(Key.enter)
  62.         time.sleep(1)
  63.         keyboard.type("m!sell all")
  64.         keyboard.press(Key.enter)
  65.         time.sleep(1)
  66.         keyboard.type("m!repair")
  67.         keyboard.press(Key.enter)
  68.         print(inputValue)
  69.         int_Delay = int_Delay2
  70.    if switch == False:  
  71.     break  
  72.  thread = threading.Thread(target=run)  
  73.  thread.start()
  74.  
  75.  
  76. def retrieve_input():
  77.     global X
  78.     global Delay
  79.     global Delay2
  80.     global inputValue
  81.     print("D1",Delay)
  82.     inputValue=textBox.get("1.0","end-1c")
  83.     print("I",inputValue)
  84.     print("D2",Delay2)
  85.     Delay = inputValue
  86.  
  87.     Delay2 = inputValue
  88.    
  89.     Number = Label (root, text='dsfsd')
  90.     Number.pack()
  91.     Number.config(text=inputValue)
  92.     print ("D1",Delay)
  93.     print("I",inputValue)
  94.     print("D2",Delay2)
  95.     X=X+1
  96.     if X == 2:
  97.         print("t")
  98.         Number.config(text="")
  99.         Number.pack_forget()
  100.         X=0
  101.    
  102.  
  103. def switchon():    
  104.  global switch  
  105.  switch = True  
  106.  print ('Auto On')  
  107.  blink()    
  108.        
  109. def switchoff():    
  110.  print ('Auto Off')  
  111.  global switch  
  112.  switch = False      
  113.        
  114. def kill():
  115.  root.destroy()    
  116.  quit()
  117.  
  118.  
  119. onbutton = tk.Button(root, text = "Auto ON", command = switchon)    
  120. onbutton.pack()    
  121. offbutton =  tk.Button(root, text = "Auto OFF", command = switchoff)    
  122. offbutton.pack()    
  123. killbutton = tk.Button(root, text = "EXIT", command = kill)    
  124. killbutton.pack()
  125.  
  126. root.geometry('450x450+500+300')
  127. root.title("Shit")
  128.  
  129. label = Label (root, text='Select how long you wish the delay to be,per every sell all/repair, default is 15,').pack()
  130. label = Label (root, text='1 = 5.5 seconds,so 15 = 82.5 seconds/1.375, mins delay per fix/sell').pack()
  131. label = Label (root, text='ONLY INPUT NUMBERS OR IT WILL BREAK').pack()
  132. label = Label (root, text='(you may need to click button twice)').pack()
  133. textBox=Text(root, height=2, width=10)
  134. textBox.pack()
  135. buttonCommit=Button(root,text="Input Delay",
  136.                     command=lambda: retrieve_input())
  137. buttonCommit.pack()
  138.  
  139. root.mainloop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top