Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This script is designed to print a series of pre-programmed messages to a chat application such as IRC, Discord or even Minecraft.
- #Import required Libraries
- ##win32api & win32com.client are NOT included with Python!
- import win32api, win32com.client, time
- #Declare Variables
- shell = win32com.client.Dispatch("WScript.Shell")
- message = [""]
- command = ""
- activeApp = ""
- #Thread Launch
- shell.appActivate(activeApp)
- time.sleep(4)
- shell.SendKeys("{ESC}")
- time.sleep(0.5)
- #Thread Loop
- for ind_mess in message:
- time.sleep(0.1)
- shell.SendKeys("t")
- time.sleep(0.2)
- shell.SendKeys(command+" ")
- time.sleep(0.1)
- shell.SendKeys(ind_mess)
- time.sleep(0.1)
- shell.SendKeys("{ENTER}")
- print("Message Printed")
Advertisement
Add Comment
Please, Sign In to add comment