Jump to content

Alittle help...


Recommended Posts

Hey im trying to make a script for a game

HotKeySet("{INSERT}", "fly")
HotKeySet("{DELETE}", "term")

Func fly()
    send("w")
    Sleep(100)
    Send("w")
    MouseClick("left")
Send ("{SPACE}")

EndFunc

Func term()
    Exit
EndFunc

what i want it to do is when i press insert it send those keys to the game...

i think i did it right but im not sure

Link to comment
Share on other sites

yeah you did it right.. but you might want to add a loop to keep it open:

HotKeySet("{INSERT}", "fly")
HotKeySet("{DELETE}", "term")

Func fly()
    send("w")
    Sleep(100)
    Send("w")
    MouseClick("left")
Send ("{SPACE}")

EndFunc

Func term()
    Exit
EndFunc
while 1
sleep(100)
wend
Edited by CHRIS95219
Link to comment
Share on other sites

i tryed it earlier

what loop would i use.

i tryed the Do > Until

but i couldnt get it to work

$sleep = 1

do
    Sleep(60000)
    
    $sleep = $sleep + 1
Until $sleep = 1000000

i dont think i would use the sleep in there.... cuase it puases the scrpit but i dont know what command to use.

wish autoit had an idle commmande feature

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...