winapi - Pressing keys with python win32api -
i trying achieve following behavior in python 2.4 script, here steps, , after them, question:
- python script starts
- the script gives 3 seconds delay change 'z' program's window
- the script clicks on 'z' program's window.
- the script stops making clicks
- /* ¿? */
- ask continue program's excecution
- /* ¿? */
- 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
Post a Comment