Jump to content

Waiting until a key is released?


Suxen
 Share

Recommended Posts

I'm writing a few macros for a game I play, it presses key combinations for me as the game's own in built method for quickly accessing features is too limited (anyone played NWN? that's the one I'm talking about). Anyway, a simple script for example:

HotKeySet("!s", "nwnStealth")

While 1
    Sleep(100)
WEnd

Func nwnStealth()
    Send("{NUMPAD0}{NUMPAD4}{NUMPAD4}")
EndFunc

Now the big kicker is that the game then thinks the key is still pressed down for some strange reason. You can add a sleep delay, but that relies on quick fingers. What I really need is a way to script a while loop, which waits until the alt or control keys are no longer being pressed down. Is this possible? I can't seem to find a function which would do what I'm after. There's MouseDown.. but no KeyDown. There's also _IsPressed, but that seems like a past tense check. Sure, it might have been pressed - maybe twice. I just need to know when it is released.

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