Harusal Posted December 1, 2008 Share Posted December 1, 2008 Hey is there a way to send keys to an inactive window? im trying to make a bot for an online game that will kill monsters for them, and let them be browsing the internet or do whatever while the bot kills monsters for them. Link to comment Share on other sites More sharing options...
Pain Posted December 1, 2008 Share Posted December 1, 2008 ControlSend(), use search next time. Link to comment Share on other sites More sharing options...
Harusal Posted December 2, 2008 Author Share Posted December 2, 2008 how would i use that to send keys to inactive window? the game is called knight online it's windows name is Knight OnLine Client can you give me an example on how that would work please? i don't know if you need this or not but maybe it will help: Link to comment Share on other sites More sharing options...
TheTex Posted December 2, 2008 Share Posted December 2, 2008 (edited) Look in the help file for the parameters for the controlsend command, then plug in. depending on the client you *may* not be able to Edited December 2, 2008 by TheTex Link to comment Share on other sites More sharing options...
Harusal Posted December 2, 2008 Author Share Posted December 2, 2008 i have been trying to figure it out, but it's not working can you give me an example to send the key z please =) Link to comment Share on other sites More sharing options...
Pain Posted December 2, 2008 Share Posted December 2, 2008 I'm an old KO player myself so I know it won't work with ControlSend(), however it works with normal Send() but you can't have the window minimized. Link to comment Share on other sites More sharing options...
Harusal Posted December 2, 2008 Author Share Posted December 2, 2008 I'm an old KO player myself so I know it won't work with ControlSend(), however it works with normal Send() but you can't have the window minimized.but the game no longer has hack protection so many stuff that didn't work before are working now Link to comment Share on other sites More sharing options...
Pain Posted December 2, 2008 Share Posted December 2, 2008 I havn't played the game for almost two years now but try to send something with ControlSend() and then use AutoIt Window tool to see if you can catch the keystrokes, if they appears as "hidden" nothing has changed for more then two years. The correct syntax would be ControlSend("Knight OnLine Client", "", "Edit1", "This is some text") Link to comment Share on other sites More sharing options...
FireFox Posted December 2, 2008 Share Posted December 2, 2008 (edited) Hi, Your window is in flash ?...Never mind, you can just use : ControlSend("Knight OnLine Client","","","your text") $xy=Mousegetpos() ControlClick("Knight OnLine Client","","","left",1,$xy[0],$xy[1]) You can of course use others Control functions. 2nd option if you want to write in some edits : WinActivate("Knight OnLine Client","") WinWaitActive("Knight OnLine Client","",2) Send("Text in Edit1") Send("{TAB}") Send("Text in Edit2") Edited December 2, 2008 by FireFox Link to comment Share on other sites More sharing options...
Dinosaurr Posted December 3, 2008 Share Posted December 3, 2008 Hes looking to send keys, not send a string of text to type. Keys = z (target) 1-9 (skills) edit1 is a notepad control, i do not believe it will work with this game. Link to comment Share on other sites More sharing options...
FireFox Posted December 3, 2008 Share Posted December 3, 2008 (edited) Hes looking to send keys, not send a string of text to type. Keys = z (target) 1-9 (skills) edit1 is a notepad control, i do not believe it will work with this game. For sendkeys just simply WinActivate("Knight OnLine Client","") WinWaitActive("Knight OnLine Client","",2) Send("{1}{2}{3}{A}{B}{C}");..... If you want to send keys to window always inactive try ControlSend ... Edited December 3, 2008 by FireFox 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