mladost1 Posted June 1, 2008 Posted June 1, 2008 I have a simple question - is it possible to send keys to a not active window and if yes how? ~Thanks
mladost1 Posted June 2, 2008 Author Posted June 2, 2008 I'm rather looking for sending it to the whole application rather than to an exact control e.g. to a video game
someone Posted June 2, 2008 Posted June 2, 2008 I'm rather looking for sending it to the whole application rather than to an exact control e.g. to a video game Did you try controlsend? The help file says ... ControlSend works in a similar way to Send but it can send key strokes directly to a window/control, rather than just to the active window.If it doesn't work for you, try the exact same code for a non game window, its possible the game has protection against scripting. While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
mladost1 Posted June 2, 2008 Author Posted June 2, 2008 But what should I put at the control ID variable in the ControlSend("title", "text", control ID, "string") function?
someone Posted June 2, 2008 Posted June 2, 2008 Try WinGetHandle(). I would suggest looking at controls in the help file, and also Window Titles and Text (look up wingethandle, then click title special definitions)... good stuff. Games though can be tricky, a lot of them have protection against bots and such. While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now