Jury Posted July 9, 2012 Posted July 9, 2012 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\AutoIt3C:\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 errorInetGet('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 errorInetGet('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 errorConsoleWrite('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:2The second error message is on a line which si really:InetGet('http://www.courts.ie' & $array[0],~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^the program:expandcollapse popup#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
Skitty Posted July 9, 2012 Posted July 9, 2012 $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 "]"
water Posted July 9, 2012 Posted July 9, 2012 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Jury Posted July 9, 2012 Author Posted July 9, 2012 Thanks - I must've inadvertently pressed the delete key - strange how different eyes spot things (i did look)
Skitty Posted July 9, 2012 Posted July 9, 2012 It also helps following the ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ thing.It usually points to the error location
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now