Jump to content

Trouble with my else if endif


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...