|Previous Top Next|
If it finds a syntax problem, Tidy will insert warning comments as shown below and indicate the number of errors found in the lower pane of the editor. In this case the End If is incorrectly spelt and so does not close the If before the Func starts. When the error is fixed, just run Tidy again and all the inserted lines will be removed automatically. If multiple errors are shown, always start by fixing the first one and rerunning Tidy as the subsequent errors may flow from an incorrect structure earlier in the script as in the example shown.
Tidy can be run in several ways:
From within SciTE by pressing Ctrl-T
Run Tidy.exe directly and a dialog will ask for the input file
Right-click on an .au3 file and select Tidy (if the full SciTE4AutoIt3 package has been installed)
/proper or /pr=0/1
* * * Indent 0 = Tabs >0 = Number of Space
* * * Update Functions/Keywords/Macros/UDFs to Proper case
* * * Update Constants defined in the "constant Include files"
* * * Update Variables to: 1=UpperCase; 2=LowerCase; 3=First Dim/Local/Global or "First_Seen" Case
* * * Update Spaces around Delimiters
* * * Add comment to EndFunc statement e.g. "EndFunc ;==>UDF_Name"
* * * Ignore EndFunc statement comments.
* * * Remove comments from EndFunc statement.
* * * Added comment to EndRegion and make it the same as the #Region Comments.
* * * Ignore EndRegion statement comments.
* * * Remove comments from EndRegion statement.
* * * Indent #region sections
* * * Generate Documentation file for the Program and optionally Display it with Notepad at the end ot the Tidy run
* * * Keep x Version of the File before the Tidy run and optionally store them in SubDirectory "\Backup"
* * * Target backup directory which defaults to Scriptdir\Backup. Any other directory needs to exist or else it will use the default directory!
* * * Remove Empty lines from Script Source
* * * 1=Show Tidy Errors in Console 9=Debug Output
* * * Run DIFF program at the end of the Tidy run to show the difference between original and new program.
xShowDiffPgm=C:\Progra~1\WinMerge\winmerge.exe "%new%" "%old%"
* * * End With NewLine: 0=Strip Lastline CRLF (default) 1=Always end with CRLF