Jump to content
Sign in to follow this  
midgetmofia124

Alittle help...

Recommended Posts

midgetmofia124

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
cppman

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
midgetmofia124

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
midgetmofia124

bump...

Share this post


Link to post
Share on other sites
midgetmofia124

okay...

but what im asking is what do i put in the loop

a sleep, or what

Share this post


Link to post
Share on other sites
theguy0000

you should sleep for about 100 milliseconds inside the loop.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites
AceLoc

ya so should be like:

While 1
    Sleep(100)
    ;whatever you wanna do
WEnd

Thanks.


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites
dabus

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
AceLoc

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

lies.

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

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  

×