Jump to content
Sign in to follow this  
foolove

Too many syntax errors

Recommended Posts

foolove

Below are the syntax errors and code

C:\Users\Aaron\Desktop\modo.au3(25,7) : ERROR: syntax error

ElseIf

~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(26,58) : ERROR: syntax error

$FindDock2 = PixelSearch(784, 212, 797, 221, 0xFEFEFE )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(28,35) : WARNING: $FindDock2: possibly used before declaration.

MouseClick("left", $FindDock2[0],

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(29,7) : ERROR: syntax error

ElseIf

~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(30,56) : ERROR: syntax error

$FindDock3 = PixelSearch(803, 386, 817, 394, 0xFEFEFE )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(32,35) : WARNING: $FindDock3: possibly used before declaration.

MouseClick("left", $FindDock3[0],

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\Aaron\Desktop\modo.au3(39,1) : ERROR: syntax error

EndIf

^

C:\Users\Aaron\Desktop\modo.au3(28,35) : ERROR: $FindDock2: undeclared global variable.

MouseClick("left", $FindDock2[0],

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Users\Aaron\Desktop\modo.au3 - 6 error(s), 2 warning(s)

#cs ----------------------------------------------------------------------------
 
AutoIt Version: 3.3.6.1
Author:      myName
 
Script Function:
    Template AutoIt script.
 
#ce ----------------------------------------------------------------------------
 
sleep(5000)
 
 
While 1 = 1
$coord1 = PixelSearch( 538, 463, 626, 479, 0xE7E7E7 )
If Not @error Then
  MouseClick("left", $coord1[0], $coord1[1], 1)
EndIf
WEnd
 
 
$FindDock = PixelSearch(766, 41, 781, 49, 0xFEFEFE )
If Not @error Then
  MouseClick("left", $FindDock[0], $FindDock[1], 1)
ElseIf
  $FindDock2 = PixelSearch(784, 212, 797, 221, 0xFEFEFE )
If Not @error Then
  MouseClick("left", $FindDock2[0], $FindDock2[1], 1)
ElseIf
$FindDock3 = PixelSearch(803, 386, 817, 394, 0xFEFEFE )
If Not @error Then
  MouseClick("left", $FindDock3[0], $FindDock3[1], 1)
Else
  $FindDock4 = PixelSearch(819, 559, 834, 567, 0xFEFEFE )
If Not @error Then
  MouseClick("left", $FindDock4[0], $FindDock4[1], 1)
EndIf
EndIf
EndIf
EndIf
 
sleep(1000)
 
MouseClick("left", 1139, 585, 1, 0)
Send("Welcome testing 123!!!")
Send("{ENTER}")
Edited by foolove

Share this post


Link to post
Share on other sites
foolove

Also i am not sure how to exit my loop if the condition is met

Share this post


Link to post
Share on other sites
foolove

While 1 = 1

$coord1 = PixelSearch( 538, 463, 626, 479, 0xE7E7E7 )

If Not @error Then

MouseClick("left", $coord1[0], $coord1[1], 1)

If Not @error Then ExitLoop

EndIf

WEnd

maybe the above code is right for exiting on these loops not sure

Share this post


Link to post
Share on other sites
BrewManNH

Please read the help file in regards to how to use If...ElseIf...Else statements. Right now the script you have is written so badly there's no helping it without a better explanation of what it is you're trying to do. Describe the logic flow of what you want it to do, and then after you've read the help file it might make more sense to you.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
somdcomputerguy
ExitLoop doesn't do it's thing in If conditional statements.

- 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

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  

×