bourny Posted October 30, 2007 Share Posted October 30, 2007 I am having issues when running a script with file.au3 included .... A simple script such as #include <include\File.au3> $sFilePath = "c:\test322.txt" _FileCreate ( $sFilePath ) This will give out the following errors when doing a script check with Scite.. I have reinstalled AutoIt and used an example from the help file to minimize typos etc... ********************************************************************************************** >"C:\Program Files\AutoIt3\SciTE\au3check\au3check" "C:\Program Files\AutoIt3\test.au3" AutoIt3 Syntax Checker v1.32 Copyright © Tylo 2005 C:\Program Files\AutoIt3\include\File.au3(101,56) : ERROR: SetError() [built-in] called with wrong number of args. If Not FileExists($sPath) Then Return SetError(1, 1, ") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(102,252) : ERROR: SetError() [built-in] called with wrong number of args. If (StringInStr($sFilter, "\)) Or (StringInStr($sFilter, "/)) Or (StringInStr($sFilter, ") Or (StringInStr($sFilter, ">)) Or (StringInStr($sFilter, "<)) Or (StringInStr($sFilter, "|)) Or (StringStripWS($sFilter, 8) = ") Then Return SetError(2, 2, ") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(103,78) : ERROR: SetError() [built-in] called with wrong number of args. If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, ") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(105,47) : ERROR: SetError() [built-in] called with wrong number of args. If $hSearch = -1 Then Return SetError(4, 4, ") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(382,57) : ERROR: syntax error Local $bRootOnly = False ; Return only root information ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(387,61) : ERROR: syntax error If @extended = StringLen($sFullPath) Then $bRootOnly = True ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(396,11) : ERROR: syntax error $sPath & ~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(416,18) : ERROR: syntax error If $j Then $j - ~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(419,7) : ERROR: syntax error $j + ~~~^ C:\Program Files\AutoIt3\include\File.au3(428,15) : ERROR: syntax error $sFullPath & ~~~~~~~~~~~^ C:\Program Files\AutoIt3\include\File.au3(431,14) : ERROR: syntax error $sFullPath & ~~~~~~~~~~~^ C:\Program Files\AutoIt3\test.au3 - 11 error(s), 0 warning(s) >Exit code: 2 Time: 0.211 Link to comment Share on other sites More sharing options...
bourny Posted October 30, 2007 Author Share Posted October 30, 2007 The following doesnt work either ***** $ver = FileGetVersion("C:\Program Files\Sophos\Sophos Anti-Virus\savmain.exe", "ProductVersion") MsgBox(0, "exe version", $ver) ****** Gets ERROR: FileGetVersion() [built-in] called with wrong number of args. $ver = FileGetVersion("c:\program files\sophos\Sophos anti-virus\savmain.exe, "ProductVersion) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Is my Scite having a laugh ..... I never had any issues with 3.11 but having loads off issues since 3.22 onwards - I kept using 3.11 due to these errors but now need to use latest version to get the new functions Link to comment Share on other sites More sharing options...
picaxe Posted October 30, 2007 Share Posted October 30, 2007 I see the same problem, with autoit v3.3.8.1 and beta v3.2.9.3. Why not use FileOpen($sFilePath, 2) Link to comment Share on other sites More sharing options...
weaponx Posted October 30, 2007 Share Posted October 30, 2007 This line: #include <include\File.au3> should be #include <File.au3> Link to comment Share on other sites More sharing options...
Zedna Posted October 30, 2007 Share Posted October 30, 2007 I have no problems/errors running this on 3.2.8.1 and also 3.2.9.4 #include <File.au3> $sFilePath = "c:\test322.txt" _FileCreate ( $sFilePath ) File is successfully created. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
weaponx Posted October 30, 2007 Share Posted October 30, 2007 (edited) Someone else just had this same problem with SetError() number of parameters:http://www.autoitscript.com/forum/index.php?showtopic=56020 Please update Scite4AutoIt3 to correct your error from Au3Check. CompileAU3 changed name to AutoIt3Wrapper a long time ago. The logic that Au3Check uses now is quite different to the way it used to work. Edited October 30, 2007 by weaponx Link to comment Share on other sites More sharing options...
picaxe Posted October 30, 2007 Share Posted October 30, 2007 Thanks Weaponx, missed the typo. Also the FileGetVersion works for me? Link to comment Share on other sites More sharing options...
bourny Posted October 30, 2007 Author Share Posted October 30, 2007 The Script seems to work but it is Scite that spits out the errors making debugging / checking your script difficult for all the errors comming from file.au3. I think the post asking me to change the scite config to point to Au3wrapper instead of au3info is correct but how do I change the config - not obvious to me... I have done the default install of the latest version and I still get these errors when script checking with Ctrl + F5 Any further help appreciated... Is the bundled version of scite correct in terms of the au3info / wrapper config .. I have changed the line to #include<file.au3> and this still gives the error .... Thanks Link to comment Share on other sites More sharing options...
weaponx Posted October 30, 2007 Share Posted October 30, 2007 Did you uninstall the version of SciTE included with AutoIT and install the version from the link I posted? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2007 Developers Share Posted October 30, 2007 Did you uninstall the version of SciTE included with AutoIT and install the version from the link I posted?no need to uninstall the SciTE "lite" version (its not really an available option), just update to the latest version of SciTE4Autoit3 which will ensure that the proper version of au3check is used. 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...
bourny Posted October 31, 2007 Author Share Posted October 31, 2007 Thanks... It appears the latest installer of Scite full edition includes au3wrapper and resolves the issue ....I kept to V3.11 due to this issue with the script check in Scite and not had an opportunity to sort it out till now... I left the lite edition on as I thought the bundled version of the Scite program with the latest version of AutoIt would be upto date and correct - obviously not the case.... Many Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted October 31, 2007 Developers Share Posted October 31, 2007 (edited) You were not running any resent SciTE4AutoIt3 "lite" version because that would run the proper au3check program and wouldn't have given this issue. You probably installed the full installer of SciTE4AutopIt3 a while ago which is detected by the AutoIt3 installer and will skip the "lite" version install. Edited October 31, 2007 by Jos 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...
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