We Recommend

Learning Python Learning Python
The authors of Learning Python show you enough essentials of the Python scripting language to enable you to begin solving problems right away, then reveal more powerful aspects of the language one at a time. This approach is sure to appeal to programmers and system administrators who have urgent problems and a preference for learning by semi-guided experimentation.


Posted By

buscarini on 07/13/06


Tagged

mediaencoder trabajo grabaciones pywinauto automatizar


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

anayhk


Manejar las grabaciones de windows media encoder


Published in: Python 


  1. import pywinauto
  2. from pywinauto import *
  3. from pywinauto import application
  4.  
  5.  
  6. encoderdir = "C:\\Archivos de programa\Windows Media Components\Encoder"
  7. wmenc = "\wmenc.exe"
  8.  
  9.  
  10. app.start _(encoderdir + wmenc)
  11.  
  12.  
  13. win = app.window_(title_re = ".*Media Encoder.*")
  14.  
  15. # Empezar a codificar (pulsando ctrl+shift+E)
  16. win.TypeKeys("^+E")
  17.  
  18. # Volver a abrir la ventana
  19. win.Restore ()
  20.  
  21. # Parar la codificacion
  22. win.TypeKeys("^+S")
  23.  
  24. # Mostrar las propiedades de la sesion
  25. win.TypeKeys("%{ENTER}")
  26.  
  27. win.TypeKeys("%{ENTER}")

Report this snippet 

You need to login to post a comment.