mladost1 Posted June 1, 2008 Share 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 Link to comment Share on other sites More sharing options...
bf2forlife Posted June 1, 2008 Share Posted June 1, 2008 Controlsend() Link to comment Share on other sites More sharing options...
mladost1 Posted June 2, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
someone Posted June 2, 2008 Share 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 Link to comment Share on other sites More sharing options...
mladost1 Posted June 2, 2008 Author Share Posted June 2, 2008 But what should I put at the control ID variable in the ControlSend("title", "text", control ID, "string") function? Link to comment Share on other sites More sharing options...
someone Posted June 2, 2008 Share 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 Link to comment Share on other sites More sharing options...
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