Sign in to follow this  
Followers 0
lee90

Need help (Mising Wend)

3 posts in this topic

#1 ·  Posted (edited)

Hi, below is the code I have written:

While 1
    Sleep(500)
    Send("{RIGHT down}")
    Sleep(8500)
    Send("{RIGHT up}")
    Sleep(2000)
    Send("{L}")
    Sleep(2000)
    Send("{DOWN}")
    Sleep(1000)
    Send("{L}")
    Sleep(1000)
    Send("{L}")
    Sleep(1800)
    $Diffselect = 0
    While $Diffselect < $Difficulty
        Send("{DOWN}")
        Sleep(500)
        $Diffselect = $Diffselect + 1
    WEnd
    Send("{L}")
    ;Enter S1
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Opt('SendKeyDelay', 50); Default speed
    _Send('a', 20000)
    
    Func _Send($text, $milliseconds)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
$time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
$time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
$time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    ;Enter S2
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(800)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    sleep(500)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
$time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    ;Enter S3
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
$time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    ;Enter S4
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    ;Enter S5
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Send("{left}")
    Sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
    Sleep(600)
    Send("{right}")
    sleep(600)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    sleep(600)
    Sleep(5000)
    ;Exit
    Send("{RIGHT down}")
    Sleep(4000)
    Send("{RIGHT up}")
    Sleep(1000)
    Send("{L}")
    Sleep(1000)
    Send("{L}")
    Sleep(1500)
    Send("{RIGHT down}")
    Sleep(3000)
    Send("{RIGHT up}")
    Sleep(1500)
    Send("{L}")
    Sleep(1000)
    Send("{DOWN}")
    Sleep(1500)
    Send("{L}")
    Sleep(1500)
    Send("{L}")
    Sleep(1500)
EndFunc

Error that i get

C:\Users\lee90\Desktop\done by lee90.au3(42,5) : ERROR: missing Wend.
    Func
~~~~^
C:\Users\lee90\Desktop\done by lee90.au3(10,1) : REF: missing Wend.
While
^
C:\Users\lee90\Desktop\done by lee90.au3 - 1 error(s), 0 warning(s)

I tried to input wend at the end of the script but still i got the same error..any1 can help me? thanx

Edited by lee90

Share this post


Link to post
Share on other sites



While 1
    Sleep(500)
    Send("{RIGHT down}")
    Sleep(8500)
    Send("{RIGHT up}")
    Sleep(2000)
    Send("{L}")
    Sleep(2000)
    Send("{DOWN}")
    Sleep(1000)
    Send("{L}")
    Sleep(1000)
    Send("{L}")
    Sleep(1800)
    
   While 2
      $Diffselect = 0
      $Diffselect < $Difficulty
        Send("{DOWN}")
        Sleep(500)
        $Diffselect = $Diffselect + 1
    WEnd
    
    Send("{L}")
    ;Enter S1
    Sleep(2500) 
    Send("{RIGHT down}")
    Sleep(1000)
    Send("{RIGHT up}")
    Sleep(600)
    Opt('SendKeyDelay', 50); Default speed
    _Send('a', 20000)
 WEnd
    
    Func _Send($text, $milliseconds)
    $time = TimerInit()
    Do
        Send($text)
    Until TimerDiff($time) > $milliseconds
    Sleep(600)
    Send("{left down}")
    Sleep(1000)
    Send("{left up}")
   EndFunc

If this doesn't work there are other ways to make it work =]

Share this post


Link to post
Share on other sites

Thanks Black~ It works ! :graduated:

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