Delta01 Posted January 23, 2008 Posted January 23, 2008 Hey, I'm trying to send the END key to a game, when I use AutoIt window info on the program, I get no control data, however I can send keys like a,b,c to the game and it works. When I try to send END it doesn't work, it doesn't send it to the game. I tried ControlGetHandle too and used the returned value as my control ID, no luck. Below is my code, is something wrong? $var = WinList("[CLASS:CLIENT]") For $i = 1 to $var[0][0] Next ControlSend($var[1][1], "", 0x000203AA, "{END}") ControlSend($var[1][1], "", "", "!" &"f") I've tried the hex code in " " and out, I've tried with and without it. Does anybody know? Cheers
blademonkey Posted January 23, 2008 Posted January 23, 2008 have u tried just using send() ? ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
Delta01 Posted January 23, 2008 Author Posted January 23, 2008 I need to send it to a minimized window.
Delta01 Posted January 23, 2008 Author Posted January 23, 2008 (edited) Nvm, I did a bit of experimenting and decided that the below code will do. You can't even tell that anything happened while the key(s) got sent!! $title = WinGetTitle("[ACTIVE]") WinSetTrans("Game", "", 0) WinActivate("Game", "") Send("{END}") WinSetTrans("Game", "", 255) WinActivate($title) Edited January 24, 2008 by Delta01
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