Sign in to follow this  
Followers 0
ctimeless

End Statement Badly Formatted

6 posts in this topic

So after it exits the loop, i want it to go the 2nd part but then i get an error

Line 28: End Statement is badly formatted?

I dont see anything wrong with thought

For $y = 178 To 200 Step +22 ;first part
    If $y > 200 Then ExitLoop   
Sleep (1500)
MouseMove(999, 209, 5) ;member srch
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(281, $y, 5) ;y coord at 300
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(999, 209, 5) ;member srch
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(897, 300, 5) ;y coord at 300
Sleep (500)
MouseClick("primary") ;original ema
Sleep (500)
MouseMove(909, 680, 5) 
Sleep (500)
MouseClick("primary") ;send
Sleep (500)
MouseMove(643, 446, 5) ;ok
Sleep (1200)
MouseClick("primary",643, 446, 2, 10) 
Next ;loop again

For ;2nd part
Sleep (1500) 
MouseMove(999, 209, 5) ;member srch
MouseClick("primary",999, 209, 2, 10) 
Sleep (500)
MouseClickDrag("left", 892, $i, 895, 235) ;continue back to beginning
Next

For $y = 178 To 200 Step +22 
Sleep (1500)
MouseMove(999, 209, 5) ;member srch
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(281, $y, 5) ;y coord at 300
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(999, 209, 5) ;member srch
Sleep (500)
MouseClick("primary") 
Sleep (500)
MouseMove(897, 300, 5) ;y coord at 300
Sleep (500)
MouseClick("primary") ;original ema
Sleep (500)
MouseMove(909, 680, 5) 
Sleep (500)
MouseClick("primary") ;send
Sleep (500)
MouseMove(643, 446, 5) ;ok
Sleep (1200)
MouseClick("primary",643, 446, 2, 10) 
Next ;loop again

Share this post


Link to post
Share on other sites



On line 29, For what?


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

For $y = 178 To 200 Step +22 ;first part

If $y > 200 Then ExitLoop

Sleep (1500)

MouseMove(999, 209, 5) ;member srch

Sleep (500)

MouseClick("primary")

Sleep (500)

MouseMove(281, $y, 5) ;y coord at 300

Sleep (500)

MouseClick("primary")

Sleep (500)

MouseMove(999, 209, 5) ;member srch

Sleep (500)

MouseClick("primary")

Sleep (500)

MouseMove(897, 300, 5) ;y coord at 300

Sleep (500)

MouseClick("primary") ;original ema

Sleep (500)

MouseMove(909, 680, 5)

Sleep (500)

MouseClick("primary") ;send

Sleep (500)

MouseMove(643, 446, 5) ;ok

Sleep (1200)

MouseClick("primary",643, 446, 2, 10)

Next ;loop again

this last line

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ctimeless,

What somdcomputerguy was trying to point out is that line 29 is formated incorrectly:

For ;2nd part

On line 1 you got it correctly with:

For $y = 178 To 200 Step +22 ;first part

Realm :graduated:

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

No...You line 29 needs something else..

For $i = 1 To 30 ;for example

For $Element in $Array ;for example

You have nothing after the For in line 29...that is not allowed. You have a For loop with no parameters.

Share this post


Link to post
Share on other sites

ctimeless. Consider installing Scite4AutoIt3. It will give you better help messages. like,

D:\CODE\AutoIt\Test\_TEST_.au3(46,14) : ERROR: syntax error
For ;2nd part
~~~~~~~~~~~~~^


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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