Jump to content
Sign in to follow this  
syber

Help with script - hold down keys

Recommended Posts

syber

Hi,

I am trying to create a script to hold down the 'D' key for 4 seconds before release and then holding down the 'A' key for another 4 seconds before release. This will start when i press F1 and will keep looping until i press F1 again (or another key) to stop it.

I am really a newbie at this, but tried the script below. Can someone please help me to edit this please??? Thanks so much.

$F1::

Loop

{Send("{D down}")

Sleep(4000)

Send("{D up}")

Send("{A down}")

Sleep(4000)

Send("{A up}")

}

return

Share this post


Link to post
Share on other sites
syber

So what happens, when you run it?

What does the output from SciTE say?

error parsing function call....

Can someone be helpful enough to change this script for me plese?

Share this post


Link to post
Share on other sites
Jos

error parsing function call....

Can someone be helpful enough to change this script for me plese?

As said... this is NOT an AutoIt3 script.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
smartee

Hi syber,

Welcome to the forums !! ;)

Take a couple moments to peruse the help-file and Wiki to get a general idea of AutoIt's syntax, then take a look at these pages:

Hotkeys

Looping

Revisit and modify your script, and post back if your still stuck :)

Good luck ;)

-smartee

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  

×