Jump to content
Sign in to follow this  
bbq

Send("{a down}")

Recommended Posts

bbq

Suppose I have the following code:

WinWaitActive("Untitled -");
Send("{a down}");
Sleep(50000);
Send("{a up}");

That should wait until I have notepad as the active window and then hold a down for 50000 milliseconds, correct?

Unfortunately, I only get one a. My intention is to hold a key down in a game, and I of course tried it in game, but it had the same effect.

Am I missing something?

Share this post


Link to post
Share on other sites
xcal

You're saying you want to hold down 'a' but you're only seeing 1 'a' being spit out? Did you actually want it held down, or did you want it pressed over and over? Try something like...

HotKeySet('{escape}', 'quit')

WinWaitActive("Untitled -")
While 1
    Send("a")
    Sleep(100)
WEnd


Func quit()
    Exit
EndFunc   ;==>quit

Share this post


Link to post
Share on other sites
bbq

Alright, I've figured it out. I asked the question on behalf of my friend who said it didn't work in game, and seeing it not work in notepad I believed him. However, it does work in game.

Sorry for the waste of time :whistle:

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.