Suxen Posted September 21, 2007 Posted September 21, 2007 (edited) 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 September 21, 2007 by Suxen
flyingboz Posted September 21, 2007 Posted September 21, 2007 have you looked at the relevant option settings ? SendKeyDelay SendKeyDownDelay Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
Suxen Posted September 21, 2007 Author Posted September 21, 2007 I did indeed. Turns out _IsPressed is what I was after, though. I guess I'll live and learn on testing stuff properly.
Dirk98 Posted September 21, 2007 Posted September 21, 2007 I did indeed. Turns out _IsPressed is what I was after, though. I guess I'll live and learn on testing stuff properly.Please post the code in this thread when you complete it.Thanks.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now