Sign in to follow this  
Followers 0
YourMama101

Need help with coding :(

4 posts in this topic

hi

So I am a new user to Autoit, and I just want to program something simple in Autoit.

All I want to know is how to make the script hold down the direction button for a specific time, how to make it press up, down, left, right, the "c" key, the "z" key, and if it is possible to make the bot press the "c" key 3 times with 100 ms of delay, and z for 20 times with 20 ms of delay.

Thank you ;)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Have a look at the send and sleep commands.

A good starting point to learn AutoIt is the Wiki.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

So if I use the sleep command, does that mean that the key will be pressed for that amount of time?

Share this post


Link to post
Share on other sites

You could usething like:

Send("{c down}") ;Holds the c key down 
Sleep(20000) ; Wait 20 seconds
Send("{c up}") ;Releases the c key

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  
Followers 0