Gene Posted November 27, 2005 Share Posted November 27, 2005 (edited) Hi,I'm getting errors from the Scite Beta au3 check that I don't understand. The Scite error log is pasted below. I have inserted a 5 or more line referenced code snippet below each error reported. Each snippet 2 lines before and 2 lines after the referenced line. I would appreciate some explanation or direction. I'm using beta .90 and the latest Scite updates posted today. I'm running Win2Kp with sp4.>K:\Local\Prog\AutoIt3\SciTe\CompileAU3\CompileAU3.exe /beta /AU3Check /in "K:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3">Running AU3Check...K:\Local\Prog\AutoIt3\SciTe\Defs\Unstable\Au3Check\au3check.datK:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(127,3) : ERROR: missing EndIf. Next ^For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i])I tried the If, Then, Next statement above as a 1 liner and it didn't like that either.K:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(126,52) : REF: missing EndIf. If _PrepLine4Processing($asLineArray[$i]) = 0 Then ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^;Process each element of the array for Vars, Macros, and UDF defines For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIfK:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(128,2) : ERROR: syntax error EndIf ^If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i]) _ProcessLine4Macros($asLineArray[$i])K:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(4,22) : ERROR: _LogMessage(): undefined function._LogMessage(" Line 4")~~~~~~~~~~~~~~~~~~~~~^#include <Array.au3> _LogMessage(" Line 4") $sTarget = "" $sVarListFile = ""Here is the UDF:Func _LogMessage($sMsg) FileWrite(@ScriptDir & "\Action.LOG", @YEAR & "/" & @MON & "/" & @MDAY & " - " & @HOUR & ":" & @MIN & ":" & @SEC & $sMsg & @CRLF) EndFunc ;==>_LogMessageK:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(120,48) : ERROR: _LoadandSplitTargetFile(): undefined function.$asLineArray = _LoadandSplitTargetFile($sTarget)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^;Open the target file and load it into an array. _LogMessage(" About to load $asLineArray Line 107") $asLineArray = _LoadandSplitTargetFile($sTarget) ;_ArrayDisplay ( $asLineArray, "info. 106" )This UDF is much longer, here are the first and last lines:Func _LoadandSplitTargetFile($sFileTarget) Local $sTargetFile = "" Return $asTargetLines EndFunc ;==>_LoadandSplitTargetFileK:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(126,42) : ERROR: _PrepLine4Processing(): undefined function. If _PrepLine4Processing($asLineArray[$i]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^;Process each element of the array for Vars, Macros, and UDF defines For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIfThis UDF is longer, BUT here it is:Func _PrepLine4Processing($sLin2Parse) $sLin2Parse = StringReplace($sLin2Parse, @TAB, " ", 2000) $sLin2Parse = StringStripWS($sLin2Parse, 3) $sLin2Parse = StringReplace($sLin2Parse, " ", " ", 2000) If $sLin2Parse = "" Then Return 0 If StringLeft($sLin2Parse, 1 ) = ";" Or (StringLeft($sLin2Parse, 1 ) = "#" And StringLeft($sLin2Parse, 8 ) <> "#include") Then Return 0 Return 1 EndFunc ;==>_PrepLine4ProcessingK:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3 - 5 error(s), 0 warning(s)>AU3Check Ended with Error(s).>Exit code: 0 Time: 0.853Edit: Forgot a statement the 1st time around. Edited November 27, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 27, 2005 Share Posted November 27, 2005 Alrighty... what version of SciTE? What version of AutoIt Beta? I can answer your first inquiry, the rest I may be able to answer if I could repeat the errors. For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i]) Would work more like the following. For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then ContinueLoop EndIf _ProcessLine4Vars($asLineArray[$i]) Next It has to have a Next at the end. The way IDE's work usually is "Beginning" statements and "End" statements. Next is an end. So it pops the error that it was looking for an EndIf not a Next. Just my thoughts so far. I hope someone or I in the future will be able to help further. Also quickly... are those UDF's included with #include or are they in the same file? Thanks, and I hope I helped some, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
themax90 Posted November 27, 2005 Share Posted November 27, 2005 For the If EndIf statement it should look For <Exp[b][/b]ression> If <Exp[b][/b]ression> Then ExitLoop ;Rest EndIf Next Everything should be fixed except for the functions. Make sure the functions to not resemble anyother function in your script or any command that autoit has. Duplicates do not work, also check proper spelling and also make sure the UDF is in the script that you are running, either at the END of the script or at the end in an #include <IncludeFile.au3> statement Hope this helps. AutoIt Smith Link to comment Share on other sites More sharing options...
Developers Jos Posted November 27, 2005 Developers Share Posted November 27, 2005 (edited) Geez Gene... you like then lengthy ..don't you. I'm getting errors from the Scite Beta au3 check that I don't understand. The Scite error log is pasted below. I have inserted a 5 or more line referenced code snippet below each error reported. Each snippet 2 lines before and 2 lines after the referenced line. I would appreciate some explanation or direction. I'm using beta .90 and the latest Scite updates posted today. I'm running Win2Kp with sp4. >K:\Local\Prog\AutoIt3\SciTe\CompileAU3\CompileAU3.exe /beta /AU3Check /in "K:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3" >Running AU3Check...K:\Local\Prog\AutoIt3\SciTe\Defs\Unstable\Au3Check\au3check.dat K:\_Documents\_Dev\Projects\ProcessScriptVariables\Vmuu.au3(127,3) : ERROR: missing EndIf. Next ^ For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i]) I tried the If, Then, Next statement above as a 1 liner and it didn't like that either.I believe the syntax should look like this: For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then ContinueLoop EndIf _ProcessLine4Vars($asLineArray[$i]) Next As far as your other Undefined function errors: Are you sure you gave an #Include for those Scriptfiles containing these UDF's ? Edited November 27, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Gene Posted November 27, 2005 Author Share Posted November 27, 2005 Alrighty... what version of SciTE? What version of AutoIt Beta? I can answer your first inquiry, the rest I may be able to answer if I could repeat the errors. For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i]) Would work more like the following. For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then ContinueLoop EndIf _ProcessLine4Vars($asLineArray[$i]) Next It has to have a Next at the end. The way IDE's work usually is "Beginning" statements and "End" statements. Next is an end. So it pops the error that it was looking for an EndIf not a Next. Just my thoughts so far. I hope someone or I in the future will be able to help further. Also quickly... are those UDF's included with #include or are they in the same file? Thanks, and I hope I helped some, JS Thank you for the response. I quote from the original post: I'm getting errors from the Scite Beta au3 check that I don't understand. The Scite error log is pasted below. I have inserted a 5 or more line referenced code snippet below each error reported. Each snippet 2 lines before and 2 lines after the referenced line. I would appreciate some explanation or direction. I'm using beta .90 and the latest Scite updates posted today. I'm running Win2Kp with sp4. I have never used "ContinueLoop" before, on rereading (after a very long time), I see that it does what I was wanting to do, namely skip the rest of that pass through the For..Next loop. All of the UDFs it complained about are in the script, the names are all unique too. I only use #Includes during development. As soon as I'm near satisfied with a script, I paste all the "official" UDFs into the script and delete the #include statements. That way, no matter what changes in the interim, the "official" UDFs won't break my script if I make changes later and need to recompile. Just as importantly my EXE doesn't carry the unnecessary burden of 3 to 5 #Includes, much of which aren't used. Like Larry, I don't have much interest in developing it, but I do wish someone would develop a script to read a script and paste in all the referenced "official" UDFs and also delete the #Include statements. It would be great if it ran off the tools list in Scite. Again, thanks for your response. Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
Gene Posted November 27, 2005 Author Share Posted November 27, 2005 For the If EndIf statement it should look For <Exp[b][/b]ression> If <Exp[b][/b]ression> Then ExitLoop ;Rest EndIf Next Everything should be fixed except for the functions. Make sure the functions to not resemble anyother function in your script or any command that autoit has. Duplicates do not work, also check proper spelling and also make sure the UDF is in the script that you are running, either at the END of the script or at the end in an #include <IncludeFile.au3> statement Hope this helps. AutoIt Smith Thanks for your response. Except for the ExitLoop part, all your suggestions were good. ExitLoop woud have aborted the entire For..Next loop. I just wanted to increment $i and jump back to the top of the loop. @JS suggested ContinueLoop which I had not used before and hadn't looked at in a long time. It does what I wanted. I had already checked and rechecked the UDFs for the items you mentioned. Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
Gene Posted November 27, 2005 Author Share Posted November 27, 2005 Geez Gene... you like then lengthy ..don't you. I believe the syntax should look like this: For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then ContinueLoop EndIf _ProcessLine4Vars($asLineArray[$i]) Next As far as your other Undefined function errors: Are you sure you gave an #Include for those Scriptfiles containing these UDF's ? (Wry grin) No I don't really like them long, and I hate to type, but it often turns out that way. Thanks for your response. @JS already suggested Continue Loop I quote my reply to @JS I have never used "ContinueLoop" before, on rereading (after a very long time), I see that it does what I was wanting to do, namely skip the rest of that pass through the For..Next loop.All the other "errors" disappeared last night immediately after I posted the the request for help when I changed the code to be as shown below. By then I was too blitzed to repost and I went to bed. Original... For $i = 1 To $asLineArray[0] If _PrepLine4Processing($asLineArray[$i]) = 0 Then Next EndIf _ProcessLine4Vars($asLineArray[$i]) As changed For $i = 1 To $asLineArray[0] _PrepLine4Processing($asLineArray[$i]) _ProcessLine4Vars($asLineArray[$i]) It appears that AU3Check never recovered from that syntactical error. I quote my response to @JS as regards UDFs... All of the UDFs it complained about are in the script, the names are all unique too. I only use #Includes during development. As soon as I'm near satisfied with a script, I paste all the referenced * "official" UDFs into the script and delete the #include statements. That way, no matter what changes in the interim, the "official" UDFs won't break my script if I make changes later and need to recompile. Just as importantly my EXE doesn't carry the unnecessary burden of 3 to 5 #Includes, much of which aren't used. Like Larry, I don't have much interest in developing it, but I do wish someone would develop a script to read a script and paste in all the referenced "official" UDFs and also delete the #Include statements. It would be great if it ran off the tools list in Scite. Note referenced I forgot to put that word in the post to @JS Gene Somewhat more now. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 28, 2005 Share Posted November 28, 2005 Thank you for the response.I quote from the original post:I have never used "ContinueLoop" before, on rereading (after a very long time), I see that it does what I was wanting to do, namely skip the rest of that pass through the For..Next loop.All of the UDFs it complained about are in the script, the names are all unique too. I only use #Includes during development. As soon as I'm near satisfied with a script, I paste all the "official" UDFs into the script and delete the #include statements. That way, no matter what changes in the interim, the "official" UDFs won't break my script if I make changes later and need to recompile. Just as importantly my EXE doesn't carry the unnecessary burden of 3 to 5 #Includes, much of which aren't used. Like Larry, I don't have much interest in developing it, but I do wish someone would develop a script to read a script and paste in all the referenced "official" UDFs and also delete the #Include statements. It would be great if it ran off the tools list in Scite.Again, thanks for your response.GeneMy mistake as far as versions . I must have skipped it and went straight to the problem. I normally have a bad tendancy to do that.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
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