winapi - Pressing keys with python win32api -


i trying achieve following behavior in python 2.4 script, here steps, , after them, question:

  1. python script starts
  2. the script gives 3 seconds delay change 'z' program's window
  3. the script clicks on 'z' program's window.
  4. the script stops making clicks
  5. /* ¿? */
  6. ask continue program's excecution
  7. /* ¿? */
  8. go step 2

so, in steps 5 , 7 want simulate pressing of keys alt+tab in order go script window (in step 5), , go again 'z' program's window (in step 7). , problem have no idea how achieve (the simulation press keys alt+tab), , didn't find answers doubts. using python win32api modules positionate mouse in point , make clicks, don't find way simulate key pressing.

you need winapi function sendinput.

see description in msdn: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -