LDShadowLord

Text Chatter

Jul 4th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. #This script is designed to print a series of pre-programmed messages to a chat application such as IRC, Discord or even Minecraft.
  2.  
  3. #Import required Libraries
  4. ##win32api & win32com.client are NOT included with Python!
  5. import win32api, win32com.client, time
  6.  
  7. #Declare Variables
  8. shell = win32com.client.Dispatch("WScript.Shell")
  9.  
  10. message = [""]
  11. command = ""
  12. activeApp = ""
  13.  
  14. #Thread Launch
  15. shell.appActivate(activeApp)
  16. time.sleep(4)
  17. shell.SendKeys("{ESC}")
  18. time.sleep(0.5)
  19.  
  20. #Thread Loop
  21. for ind_mess in message:
  22.   time.sleep(0.1)
  23.   shell.SendKeys("t")
  24.   time.sleep(0.2)
  25.   shell.SendKeys(command+" ")
  26.   time.sleep(0.1)
  27.   shell.SendKeys(ind_mess)
  28.   time.sleep(0.1)
  29.   shell.SendKeys("{ENTER}")
  30.  
  31. print("Message Printed")
Advertisement
Add Comment
Please, Sign In to add comment