Sign in to follow this  
Followers 0
HRRAX

[Need Help] I want to created a simple script

4 posts in this topic

Okay, me im VERY a newbies :P so im very poor with autoit. :)

I want to created a script that press "z" each 0.5 sec and "r" each 1 second those

example:

- press "s"

- pause (0.5 sec)

- press "s"

-pause( 0.5 sec)

-press "r"

-pause (0.01 sec)

and restart

i hope im clear and thanks in advance

ps: can you say me also how to run the script plz :D

Share this post


Link to post
Share on other sites



while....wend , send, and sleep in the help file

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ive try to do a script with while... wend etc

i got this

While
    send("z")
    sleep(500)
    send("z")
    sleep(500)
    send("z")
    sleep(500)
    send("r")
    sleep(1)
    send("z")
    sleep(499)
WEnd

and it right

>"F:\Program Files\AutoIt3\beta\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Propriétaire\Bureau\knight online.au3"

C:\Documents and Settings\Propriétaire\Bureau\essais.au3 (1) : ==> Error in expression.:

While

While^ ERROR

>Exit code: 0 Time: 0.218

so i find how to do my script but he stop at the end.

how can i do for it continue forever until i close it ????

send("z")
sleep(500)
send("z")
sleep(500)
send("z")
sleep(500)
send("r")
sleep(1)
send("z")
sleep(499)
Edited by HRRAX

Share this post


Link to post
Share on other sites

While 1
    send("z")
    sleep(500)
    send("z")
    sleep(500)
    send("z")
    sleep(500)
    send("r")
    sleep(1)
    send("z")
    sleep(499)
WEnd

if i'm understanding you... this will work.

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