Jump to content
Sign in to follow this  
mach42

Can you hold a key down "x" seconds?

Recommended Posts

mach42

WOW!

It has been a few months since I last built a script and it's a new ball game. I've looked but can't see an obvious way to hold the space bar key down for "x" seconds. This would be handy in a flash game where you "build" power and let it go.

Any suggestions where to look for a similar function?

Thanks

Share this post


Link to post
Share on other sites
Joshuaaaa

Send("{SPACE Down}")
Sleep(3000) ; 3 seconds
Send("{SPACE Up}")
I want to hold down Ctrl rather than Space, but it won't work. Would it be...

Send("{Control Down}")

Sleep(3000) ; 3 seconds

Send("{Control Up}")

I've tried Ctrl aswell, won't work.

Share this post


Link to post
Share on other sites
Paulie

Try "{RCTRL Down}" or "{LCTRL Down}"

Share this post


Link to post
Share on other sites
mach42

Thanks!

I'm back to searching where that came from in documentation.

Share this post


Link to post
Share on other sites
Armand

just look at the send command... it's all there !!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites
dimm

And how to hold arrow keys {UP} {DOWN} {LEFT} and {RIGHT} ?

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.