Sign in to follow this  
Followers 0
Booo

key down not work ?

6 posts in this topic




Is this what you are trying to do?

HotKeySet("{w}", "startBind")
HotKeySet("{e}", "STOPBind")

$loop = false

Func  startBind()
    $loop = true
    while $loop= true
    Send("{a down}")
    WEnd
EndFunc

Func STOPBind()
    $loop = false
    Send("{a up}")
EndFunc

while 1
WEnd

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites

@jguinch - I ran the code with and without the captalized w.  I would have expected it to keep sending an "a" as in "aaaaaaaaaaaaaaaaaaaaaaa" until you press "e".  It did not.  It only sent one "A" when "w" was pressed.  The code I posted simulates what I think he wants to happen but I confess I don't understand why the down key does not work that way (or maybe I don't understand how it is supposed to work).

1 person likes this

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites

What is "{W}" ? Try with just "w" instead

 

not aork aith "w"

 

@jguinch - I ran the code with and without the captalized w.  I would have expected it to keep sending an "a" as in "aaaaaaaaaaaaaaaaaaaaaaa" until you press "e".  It did not.  It only sent one "A" when "w" was pressed.  The code I posted simulates what I think he wants to happen but I confess I don't understand why the down key does not work that way (or maybe I don't understand how it is supposed to work).

 

+1

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