Jump to content
Sign in to follow this  
midgetmofia124

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Please note that you have a good chance that you're game has some issues with send (at least I heard that some time ago :) )...

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  

×
×
  • Create New...