Jump to content
Sign in to follow this  
Aasem

Trouble with my else if endif

Recommended Posts

Aasem

Anyway here it is

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\newtest222.au3"

C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\newtest222.au3 (3) : ==> "Else" statement with no matching "If" statement.:

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

This is the whole script I have so far.

WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "")

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then MouseClick ( "left" , 521, 577, 1 , 1)

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then Mouseclick ( "Left" , 451, 586, 1 , 1)

Else

ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) Then MouseClick ( "left" , 493, 577, 1 , 1)

EndIf

Disregard I thought I clicked quote instead of new topic.

Edited by Aasem

Share this post


Link to post
Share on other sites
Zedna

If you use "ELSE" you must have commands after "THEN" on new line like this

WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "")

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then 
 MouseClick ( "left" , 521, 577, 1 , 1)
ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then 
 Mouseclick ( "Left" , 451, 586, 1 , 1)
Else
 ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) 
 MouseClick ( "left" , 493, 577, 1 , 1) 
EndIf
Edited by Zedna

Share this post


Link to post
Share on other sites
Aasem

If you use "ELSE" you must have commands after "THEN" on new line like this

WinActivate ( "Bleach: Last Horizon 2.0 Alpha", "")

If ControlGetText ( "Bleach: Last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges right", 1000) Then 
 MouseClick ( "left" , 521, 577, 1 , 1)
ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then 
 Mouseclick ( "Left" , 451, 586, 1 , 1)
Else
 ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: no movement", 1000) 
 MouseClick ( "left" , 493, 577, 1 , 1) 
EndIf
I literally copy and pasted your and yet I am getting the same problem of

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\meh.au3"

C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\meh.au3 (5) : ==> "Else" statement with no matching "If" statement.:

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then

>Exit code: 1 Time: 0.215

Share this post


Link to post
Share on other sites
Zedna

I literally copy and pasted your and yet I am getting the same problem of

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\meh.au3"

C:\Documents and Settings\Marquest Coleman\Desktop\BOOOOOO\meh.au3 (5) : ==> "Else" statement with no matching "If" statement.:

ElseIf ControlGetText ( "Bleach: last Horizon 2.0 Alpha", "Shadow Copy's Action: dodges left", 1000) Then

>Exit code: 1 Time: 0.215

On my PC it's without any errors.

I ran Au3Check by Ctrl+F5 from Scite.

Share this post


Link to post
Share on other sites
Aasem

On my PC it's without any errors.

I ran Au3Check by Ctrl+F5 from Scite.

Yeah, I did to. :[

EDIT No wait it's workin'.

Edited by Aasem

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.