
December 18th, 2012, 05:32 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 2
Time spent in forums: 22 m 57 sec
Reputation Power: 0
|
|
|
Controlling Game Controls In Python
Okay, so I'm trying to control my games using a python script. I tried using Keyboard event generator inside python to do this, but it seems like the game does not recognize the keyboard presses the script generates.
Code:
import win32com.client,time shell=win32com.client.Dispatch("WScript.Shell")
while 1:
shell.SendKeys("w")
time.sleep(1)
|