Jump to content

key down not work ?


Recommended Posts

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

Link to comment
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).

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...