Sign in to follow this  
Followers 0
Jury

ERROR: syntax error

5 posts in this topic

Why I'm I suddenly getting these error messages on a program I've been using for some time?

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>09:39:36 Starting AutoIt3Wrapper v.2.0.0.1 Environment(Language:0409 Keyboard:00000809 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)

>Running AU3Check (1.54.14.0) from:C:\Program Files\AutoIt3

C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3(84,116) : ERROR: syntax error

$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42 & " " & $array[3] & " " & $array[4] & ")"

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

C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3(85,44) : ERROR: syntax error

InetGet('http://www.courts.ie' & $array[0],

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

C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3(85,75) : ERROR: syntax error

InetGet('http://www.courts.ie' & $array[0], $processing & "\" & $filename)

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

C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3(86,57) : ERROR: syntax error

ConsoleWrite('http://www.courts.ie' & $array[0] & @CRLF)

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

C:\Documents and Settings\joe.ury\My Documents\AutoIt_code\A_IE_gettr_Vikys_hp3.au3 - 4 error(s), 0 warning(s)

!>09:39:36 AU3Check ended.rc:2

The second error message is on a line which si really:

InetGet('http://www.courts.ie' & $array[0],

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

the program:

#include <file.au3>
#include <INet.au3>
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <Date.au3>
;http://www.courts.ie
Dim $szDrive, $szDir, $szFName, $szExt
Global $a, $b, $title[10], $h, $len
Global $array[6]
; Get drive add paths
$TestPath = _PathSplit(@ScriptFullPath, $szDrive, $szDir, $szFName, $szExt)
$drivedir = $szDrive & $szDir
$getter = $drivedir & "getter\"
$processing = $drivedir & "getter\processing\"
$out = $drivedir & "\getter\processing\out\"
$resources = $drivedir & "\getter\resources\"
$JulDate = _DateToDayValue(@YEAR, @MON, @MDAY)
ConsoleWrite($JulDate & @CRLF)
ConsoleWrite($processing & @CRLF)
If DirGetSize($getter) = -1 Then
GUICreate("Working Directories", 300, 100)
GUICtrlCreateLabel("Create directory: " & $processing, 30, 10)
$okbutton = GUICtrlCreateButton("OK", 30, 50, 40)
$nobutton = GUICtrlCreateButton("NO", 90, 50, 40)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $okbutton
DirCreate($getter & "processing\out\")
DirCreate($getter & "resources\")
GUIDelete(); ; will return 1
ExitLoop
Case $msg = $nobutton
MsgBox(0, "GUI Event", "without these working directories this program can't work", 2)
ExitLoop
Case $msg = $GUI_EVENT_CLOSE
MsgBox(0, "GUI Event", "without these working directories this program can't work", 2)
ExitLoop
EndSelect
WEnd
EndIf

InetGet("http://www.courts.ie/Judgments.nsf/Webpages/HomePage?OpenDocument&Start=1&Count=100", $processing & "IErecent.html")
$file = FileOpen($processing & "IErecentx.html", 0)
; Check if file opened for reading OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to retrieve IErecent.txt: stage 2" & @CRLF)
Exit
EndIf
; Read file into memory
$filewhole = FileRead($file)
FileClose($file)
;RegExp Option 1, using offset
$nOffset = 1
While 1
; $array = StringRegExp($filewhole, '(\/Judgments\.nsf/\d+.*?OpenDocument).*?Arial">(.*?)<.*?Arial">(Court of Criminal Appeal|High Court|Supreme Court).*?(\d{2})\/(\d{2})\/(\d{4})', 1, $nOffset)
$array = StringRegExp($filewhole, '(\/Judgments\.nsf/\d+.*?OpenDocument).*?(\d{2})\/(\d{2})\/(\d{4}).*?Arial.>(.*?)<', 1, $nOffset)
If @error = 0 Then
$nOffset = @extended
Else
MsgBox(0, "RegExp Test with Option 1 - ", "Oops")
ExitLoop
EndIf
For $i = 0 To UBound($array) - 1
ConsoleWrite($i & @CRLF & $array[$i] & @CRLF & @CRLF)
;msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i])
Next
$a = $a + 1
$filename = StringRegExpReplace($array[2], " ", "_") & $a & ".html"
$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42 & " " & $array[3] & " " & $array[4] & ")"
InetGet('http://www.courts.ie' & $array[0], $processing & "\" & $filename)
ConsoleWrite('http://www.courts.ie' & $array[0] & @CRLF)
; EndIf
WEnd

Share this post


Link to post
Share on other sites



$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42 & " " & $array[3] & " " & $array[4] & ")"

$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42 & " " & $array[3]

$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42

"#" & "(" & $array[42

$array[42

~~~~~~~^

You're missing the "]"


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

Shouldn't this line

$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42 & " " & $array[3] & " " & $array[4] & ")"
be
$title = $array[5] & "[" & $array[4] & "] IEHC " & "#" & "(" & $array[42] & " " & $array[3] & " " & $array[4] & ")"


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks - I must've inadvertently pressed the delete key - strange how different eyes spot things (i did look) :idiot:

Share this post


Link to post
Share on other sites

It also helps following the ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ thing.

It usually points to the error location


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

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