Advertisement
Wituz

keypresser.py

Feb 24th, 2014
5,757
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import win32com.client as comclt
  2.  
  3. class Keypresser:
  4.  
  5.     wsh = None;
  6.  
  7.     def __init__(self):
  8.         self.wsh = comclt.Dispatch("WScript.Shell");
  9.     def key_press(self, key):
  10.         self.wsh.SendKeys(key)
Advertisement
RAW Paste Data Copied
Advertisement