Jump to content

While key is pressed


Jujo
 Share

Recommended Posts

Hi again,

I need help for my program.

I want to have function called on key press (e.g. Left arrow), but to exit function and call another one when that key is released.

I now use HotKeySet, but I can't use it with key release:

HotKeySet("{LEFT}", "left")
HotKeySet("{RIGHT}", "right")
HotKeySet("{UP}", "up")
HotKeySet("{DOWN}", "down")
HotKeySet("{SPACE}", "wait")

I want that while {LEFT} is pressed, the left() function is called, and when {LEFT} is released, up() is called back.

Thanks ^_^

Link to comment
Share on other sites

I tried this, but I get error, I think that I need to include a DLL, but dont know where and which...

ERROR:

If _IsPressed("{LEFT}", $hUser32_Dll) Then

If _IsPressed("{LEFT}", ^ ERROR

EDIT: I looked help and included the misc.aue3 file like in help example, but still the same error

EDIT2: I changed {LEFT} to 25, like the help says. Still error. Error says "Variable used without beign declared". It means $hUser32_DLL variable

Edited by Jujo
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...