SendKeys and Python 2.7

Michel Claveau - MVP enleverLesX_XXmcX at XmclavXeauX.com.invalid
Thu Sep 9 22:40:39 CEST 2010


Hi!

Example for send ^V  (with PyWin32):

  import time,win32api,win32con
  win32api.keybd_event(win32con.VK_CONTROL, 0, 0, 0)
  win32api.keybd_event(ord('V'), 0, win32con.KEYEVENTF_EXTENDEDKEY | 0, 0) 
  time.sleep(0.05)
  win32api.keybd_event(ord('V'), 0, win32con.KEYEVENTF_EXTENDEDKEY | win32con.KEYEVENTF_KEYUP, 0)
  win32api.keybd_event(win32con.VK_CONTROL, 0, win32con.KEYEVENTF_KEYUP, 0)



@-salutations
-- 
Michel Claveau 



More information about the Python-list mailing list