Sign in to follow this  
Followers 0
Delta01

ControlSend

4 posts in this topic

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

Share this post


Link to post
Share on other sites



have u tried just using send() ?


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

I need to send it to a minimized window.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Delta01

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0