Jump to content

Creating a simple script


Guest Franklon
 Share

Recommended Posts

Guest Franklon

Hello everyone. I'm new to AutoIt and I'm wondering if AutoIt will work with DirectInput games? Also, I hope that someone will assist me creating a simple script. Basically, I just want the script to press 1 (wait 5secs) and repeat. Is the below code correct?

Loop, 100

{

Send, {1 down}

Sleep, 1000

Send, {1 up}

Sleep, 5000

}

Thank you

**EDIT** Ok, I figured out how to compile the script. How do I install a keyboard hook so that the script will work ingame?

;the exit function
Func quit()
Exit
EndFunc

While 1

Send (1)
Sleep (2000)

WEnd

;when you push the delete button it runs the quit function
HotKeySet("{DEL}", "quit")
Edited by Franklon
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...