Search the Community
Showing results for tags 'TIDY'.
-
I make plugins for WordPress and am dissatisfied with the built-in editor. I'm now looking for a way to format the PHP code like TIDY does in AU3-Editor. I've already tried some online tools but they are buggy or have too few formatting options. Buggy: http://www.phpformatter.com/ Missing options: https://homepage-kosten.de/php_beautifier.php Here is the code to check if the beautifier is buggy: <?php /* Version: 2021.08.08#1 */ exit ( ' Version is: ' . chop ( substr ( file ( __FILE__ ) [ 2 ] , 9 , 13 ) ) ) ; /* Output from PHP Formatter: Format Error on line 5: parse error, unexpected '['([), expecting ')'! Output in Browser: Version is: 2021.08.08#1 */ ?> It would be great if you showed me a link to another beautifier that is not buggy and has options for compression. e.g. do not put comments in a new line. Or even better, a hint as to which PHP editor in WordPress meets these requirements. TIA Exit
- 2 replies
-
- php
- beautifier
-
(and 1 more)
Tagged with:
-
Is it possible to pass the path e.g. "c:\mypath\myscript.au3" to tidy.exe via the cmd line instead of using the OpenDialogue window? Sorry I couldn't find any reference to this in the help files Run("C:\Program Files (x86)\AutoIt3\SciTE\Tidy\tidy.exe /gen_doc")
-
Hi to all, I have a Tidy unhandled exception, with a script I am working on. The Tidy.exe that give me the problem is the last downloadable version (file version 21.316.1639.1 , march 23 2021) I substituted with an older (and smaller..) Tidy.exe (version 19.102.1901.0 january 2 2019) and that works like a charm. I attached screenshot of the "error" and my (unfinished) code, but this code cause the exception. Cheers Recap: OK version 19.102.1901.0 january 2 2019 FAIL version 21.316.1639.1 , march 23 2021 (current stable) FAIL version 21.316.1639.3 (beta) ComputerPlucker.au3
-
1/02/2018: Uploaded a new SciTe4AutoIt3.exe v19.102.1901.0 installer. This version contains the bugfix release for SciTE 4.1.2. There has been a major update for Tidy allowing now inline comments without them being shifted to the left by default. See this thread for the total story about the new behavior and the added options ==> SciTE4AutoIt3 v19.102.1901.0 Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 2-1-2019 *** Merged the SciTE v 4.1.2 by Neil Hodgson with our own version of SciTE. (Jos) - Fixed regex issue for Alt+F in AutoItTools.lua - Fixed another regex issue for several functions in AutoItTools.lua - Fixed Header parameters now showing None when none are - Fixed jump to function to also jump to the right Column again. - Restored AutoItTools:Copy_BookMarks() functionality *** Updated AutoIt3Wrapper v19.102.1901.0 (Jos) - 18.703.1808.1 renamed "#AutoIt3Wrapper_Au3Stripper_Stop_OnError" to "#AutoIt3Wrapper_Au3Stripper_OnError" with now as options S,C,F,Stop,Continue,ForceUse - 18.708.1148.1 Added #include <WinAPIFiles.au3> back in the included file list to ensure backward compatibility. - 18.708.1148.2 Added "Tidy_Stop_OnError" support to the AutoIt3Wrapper.INI file. Changed HiDPI settings for Win 10 compatibility. - 18.708.1148.4 Added logic to be able to display Console Output of script that have #RequireAdmin while SciTE runs at normal level. - 18.708.1148.5 Added support to allow to Stop Execution or Restart for scripts with #RequireAdmin while SciTE runs at normal level. It won't hang anymore when you reply No on the UAC and detect the elevated process didn;t start. - 18.708.1148.6 Reverted HiDPI changes made in 18.708.1148.2 as problems are reported. needs investigation. - 18.708.1148.7 Changed check for RequireAdmin AutoIt3Wrapper startup. - 18.708.1148.8 Added #include <APIResConstants.au3> for backwards compatibility with AutoIt3 v3.3.14.x. *** Updated Au3Stripper v19.102.1901.0 (Jos) - 18.708.1148.1 Fixed issue finding variable names on multiline statements - 18.708.1148.2 Added check for ending \ in the AutoIt3Dir, and remove it when there, to avoid duplication of includes. - recompiled with PellesC 6 to make it compatible with WinXP again. *** Updated SciTEConfig v19.102.1901.0 (Jos) - 18.708.1148.1 Update to allow comments in *.SciTEConfig file lines. (JPM) This update includes the updated shemes to allow changing between them. *** Updated Tidy v19.102.1901.0 (Jos) - 18.708.1148.1: Fix bug handling Directivelines ending with continuation character - 18.708.1148.2: Fixed indentation when a "None breaking space"(C2A0) character is used in a UTF file. - 18.708.1148.3: Fix bug when a continuation line starts with +x, where is would add a space between +- and number. - 18.708.9999.x: Rewrite of some internal code to allow inlinecomments to remain at their current position. Details can be found in this post: https://www.autoitscript.com/forum/topic/196221-tidy-major-update-27-10-requesting-help-with-testing/ - 18.708.9999.22: Released to Beta. - 18.708.9999.23: Added option to totally skip commentblocks so now the options are: #Tidy_Parameters=/tcb=0 =>only indent the whole commentblock (default) /tcb or /tcb=1 =>Tidy inside commentblock /tcb=-1 =>leave whole commentbock alone Tidy.INI:#--> Tidy commentblock 0=only indent the whole commentblock (default=0) # 1=Tidy inside commentblock # -1=leave whole commentbock alone Tidy_commentblock=0 - 18.708.9999.24: Added check for ending \ in the AutoIt3Dir and remove it when there. - recompiled with PellesC 6 to make it compatible with WinXP again. -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the online documentation for an overview of all extra's you get with this installer.
- 92 replies
-
7/8/2018: Uploaded a new SciTe4AutoIt3.exe v18.708.1148.0 installer. It has been over a year since the last update of the full SciTE4AutoIt3 installer whch mainly had to do with the fact that Neil was moving toward v4 of SciTE and I wanted to wait for a stable version. Any help with testing this version before general release is appreciated. Also any feedback is welcome in caseI missed something or suggestions for improvement before releasing. ==> SciTE4AutoIt3 v18.708.1148.0 Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 8-7-2018 *** Merged the SciTE v 4.1.0 by Neil Hodgson with our own version of SciTE. (Jos) This is a major change from the previous version so ensure you update all files including LUA or else you will get errors! - SciLexer au3: Fixed issues with nested CommentBlocks not always showing the correct color. - SciLexer au3: Change any line starting with # and no recognised keyword to be shown with the Pre-Processor in stead of default. - Changed Shortcut for AU3INFO to Ctrl+Shift+F6. - Moved the session restore logic for (save.session.advanced=1)into SciTE in stead of LoadSession.lua as that was clearing the recent files list of the last session when opening a file by double cliking it. This is fixed with this change. Default remains 0 so when a file is double clicked the last session isn't restored unless you add this to SciTEuser.properties: "save.session.advanced=1" - updated Tools.lua replacing [s%] with [ /t] to avoid empty lines being stripped by those functions. (Thanks Enyby) *** Updated AutoIt3Wrapper v18.708.1148.0 (Jos) - 17.224.935.1 Added /autoit3dir to au3stripper commandline, when provided to AutoIt3Wrapper., to ensure the included files are for the correct AutoIt3 directory - 17.224.935.2 Added directives: #AutoIt3Wrapper_Res_CompanyName= ;Company field #AutoIt3Wrapper_Res_LegalTrademarks= ;Trademark field - 17.224.935.5 Fixed Versioning when files contain backets -> () - 17.224.935.6 Added support for : #AutoIt3Wrapper_Au3stripper_Stop_OnError= ;(Y/N) Continue/Stop on Warnings.(Default=N) - 17.224.935.7 added INI support for: [Other] Au3Stripper_Stop_OnError=n - 17.224.935.10 Minor changes in console messages - 17.224.935.11 Modifications from JPM: - add #AutpIt3Wrapper_Res_Cursor_Add - "clean" a little bit AutoIt3Wrapper.au3 *** Updated Au3Stripper v18.708.1148.0 (Jos) - 17.224.935.1 Fixed crash when an include file contains longer record than 4096 characters. - 17.224.935.2 Changed /rsln to replace @ScriptLineNumber in the Master script with "XXX/YYY". XXX is the master script linenumber, YYY is the Merged script linenumber. - 17.224.935.3 Fixed issue detecting #cs #ce when a space was missing after the directive. - 17.224.935.4 Changed Close/Open logic for Tracelog to (hopefully) avoid the hardcrash. - 17.224.935.5 improved speed avoiding rereading include files to determine the max rec len. - 17.224.935.6 improved speed by re-coding the check for long records. - 17.224.935.7 Made sure the returncode is the highest from all iterations in stead of the last iteration. - 17.224.935.8 fix for reported bug: https://www.autoitscript.com/trac/autoit/ticket/3623#comment:4 - 17.224.935.9 added support for #autoit3wrapper_autoit3dir - 17.224.935.10 Fixed support for #autoit3wrapper_autoit3dir when followed by linecomment Stop processing when include file isn't found. - 18.624.1847.1 strip the leading and trailing double quotes from the autoit3dir directive to avoid an error when they are specified. - 18.624.1847.2 Fixed Hardcrash in the Include logic - 18.624.1847.3 Fixed Hardcrash in Func stripping logic by enlarging the base table size - 18.702.1556.1 Fixed regression bug with the Translate option. - 18.703.1808.2 Fixed regression bug with the Stripping FUNC logic for the first found FUNC. *** Updated SciTEConfig v18.708.1148.0 (Jos) - 17.224.935.1 No updates *** Updated Tidy v18.708.1148.0 (Jos) - 17.224.935.1 Added option to copy comments from #CS to #CE. Default is to copy the comments. Added Tidy Parameters: /Skip_CE_Comment or /scec will skip this copy action Added INI option: * * * Add comment to #CE/#CommentEnd and make it the same as the #CS/CommentStart Comments. ce_comment=1 - 17.224.935.2 Fix issue with Copy comments on comment start - end - 17.224.935.4 Fix another issue with Copy comments on comment start - end -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the online documentation for an overview of all extra's you get with this installer.
- 90 replies
-
- scite
- scite4autoit3
-
(and 3 more)
Tagged with:
-
I am reaching out to you all to test this version of Tidy to see whether that works on your scripts and report back your finding. Changes in this version: Leave inline comments on the original position when the line is tidied, where possible. Handle None Breaking Spaces (NBS) for Ascii and UTF8 files: NBS characters within the leading & trailing whitespace and inside the code will be replaced by a regular space to allow tidy to properly tidy the code. NBS characters in a literal string will not be replaced as they are presumably there for a reason. NBS characters inside an inline comment will be left alone too. Added support for directive: #Tidy_ILC_Pos=nn (See below for details) Replaced /Skip_Commentblock & /scb for /Tidy_Comment block & /tcb and made the default not to tidy comment blocks, as they are frequently used for simple documentation which would making tidying impossible. /tcb=0 =>only indent the whole commentblock (default) /tcb or /tcb=1 =>Tidy inside commentblock /tcb=-1 =>leave whole commentbock alone Added support for the following tidy.ini settings: #-->Define the TabSize size tabsize=4 #--> Tidy commentblock 1=Tidy, 0=Do not tidy default=0 Tidy_commentblock=0 #-->Define the default column for inline comments, 0=keep current position icl_pos=0 Changed the logic for the comment part of #directives. See last example for an explanation Fixed issue in "Variable proper" function, sometimes not updating the variable to the proper caps. Changed the program to CUI to show console output when ran from CMD prompt. Changed the returncode to -1 when no changes are made. A change in AutoIt3Wrapper will test for this and show as such. Updated support for inline comments: One of the items that has been on my wish-/todolist for a long time was to leave inline comments as they were, instead of removing all whitespace between statement and inline comment: For example that this untidied code: global $A=1 if $a=1 then ; test $a $a=2 ; Set $a endif ; end test The current production version will change that to: Global $A = 1 If $a = 1 Then ; test $a $a = 2 ; Set $a EndIf ; end test The new Beta version will change that to: (leaving the Comment start column the same as it was) Global $A = 1 If $A = 1 Then ; test $a $A = 2 ; Set $a EndIf ; end test Tidy.Ini optional change Tidy will determine the position of the inline comment by using the tabchar & tabsize parameter from Tidy.ini: [ProgramSettings] * * * Indent 0 = Tabs >0 = Number of Space tabchar=0 tabsize=4 #-->Define the default column for inline comments, 0=keep current position icl_pos=0 #--> Tidy commentblock 0=only indent the whole commentblock (default=0) # 1=Tidy inside commentblock # -1=leave whole commentbock alone Tidy_commentblock=0 When not provided in the INI it will be defaulted to Using Tabs with a size of 4. When running from within SciTE, a warning is shown in the SciTE console, when they deviate from the SciTE Settings for: use.tabs=1 indent.size=4 It could help while testing to use Winmerge to see what exactly was changed during the Tidy run by adding this to Tidy.ini: ShowDiffPgm = """C:\Program Files (x86)\WinMerge\winmergeu.exe" "%new%" "%old%""" Support for directive #Tidy_ILC_Pos=nn Tidy will keep inline comment on their original position, but this can be overridden by the directive: #Tidy_ILC_Pos=nn When nn is greater than 0, Tidy will use the defined number as the Inline comment start column going forward. When nn= 0 then use the old ILC column. When nn= -1 then strip the spaces between Code and ILC (Old Tidy behavior) EG Original Tidied script: Global Enum _ $ADO_ERR_SUCCESS, _ ; No Error $ADO_ERR_GENERAL, _ ; General - some ADO Error - Not classified type of error $ADO_ERR_ENUMCOUNTER ; just for testing Global Const $ADO_EXT_DEFAULT ; default Extended Value Global Const $ADO_EXT_PARAM1 ; Error Occurs in Parameter #1 Global Const $ADO_EXT_PARAM2 ; Error Occurs in Parameter #2 Global Const $ADO_EXT_PARAM3 ; Error Occurs in Parameter #3 Now with new directive added to line up the inline comments: #Tidy_ILC_Pos=40 Global Enum _ $ADO_ERR_SUCCESS, _ ; No Error $ADO_ERR_GENERAL, _ ; General - some ADO Error - Not classified type of error $ADO_ERR_ENUMCOUNTER ; just for testing Global Const $ADO_EXT_DEFAULT ; default Extended Value Global Const $ADO_EXT_PARAM1 ; Error Occurs in Parameter #1 Global Const $ADO_EXT_PARAM2 ; Error Occurs in Parameter #2 Global Const $ADO_EXT_PARAM3 ; Error Occurs in Parameter #3 Example Setting the new column to different values and back to original (0) Before Tidy run: #Tidy_ILC_Pos=30 Global Enum _ $ADO_ERR_SUCCESS, _ ; No Error $ADO_ERR_GENERAL, _ ; General - some ADO Error - Not classified type of error $ADO_ERR_ENUMCOUNTER ; just for testing #Tidy_ILC_Pos=50 Global Const $ADO_EXT_DEFAULT ; default Extended Value Global Const $ADO_EXT_PARAM1 ; Error Occurs in Parameter #1 Global Const $ADO_EXT_PARAM2 ; Error Occurs in Parameter #2 Global Const $ADO_EXT_PARAM3 ; Error Occurs in Parameter #3 Global Const $ADO_EXT_PARAM4 ; Error Occurs in Parameter #4 #Tidy_ILC_Pos=0 Global Const $ADO_EXT_PARAM5 ; Error Occurs in Parameter #5 Global Const $ADO_EXT_PARAM6 ; Error Occurs in Parameter #6 Global Const $ADO_EXT_INTERNALFUNCTION ; Error Related to internal Function - should not happend - UDF Developer make something wrong ??? Global Const $ADO_EXT_ENUMCOUNTER ; just for testing After Tidy run: #Tidy_ILC_Pos=30 Global Enum _ $ADO_ERR_SUCCESS, _ ; No Error $ADO_ERR_GENERAL, _ ; General - some ADO Error - Not classified type of error $ADO_ERR_ENUMCOUNTER ; just for testing #Tidy_ILC_Pos=50 Global Const $ADO_EXT_DEFAULT ; default Extended Value Global Const $ADO_EXT_PARAM1 ; Error Occurs in Parameter #1 Global Const $ADO_EXT_PARAM2 ; Error Occurs in Parameter #2 Global Const $ADO_EXT_PARAM3 ; Error Occurs in Parameter #3 Global Const $ADO_EXT_PARAM4 ; Error Occurs in Parameter #4 #Tidy_ILC_Pos=0 Global Const $ADO_EXT_PARAM5 ; Error Occurs in Parameter #5 Global Const $ADO_EXT_PARAM6 ; Error Occurs in Parameter #6 Global Const $ADO_EXT_INTERNALFUNCTION ; Error Related to internal Function - should not happend - UDF Developer make something wrong ??? Global Const $ADO_EXT_ENUMCOUNTER ; just for testing Example what happens with the different directives Before Tidy run: #Tidy_ILC_Pos=40 #UnknowDirective test ; comment ; Know directives/preprocessor Table -> au3.keywords.properties ;~ au3.keywords.special=#endregion #forcedef #forceref #ignorefunc #pragma #region #Region test ;test ; comment there not enough spaces, so simply copy Eveything after #Region to #EndRegion #EndRegion test ; will be replaced #Region test ; comment there are 4 spaces after #region so can line it up with EndRegion #EndRegion test ; will be replaced #forcedef aaaaaa ; comment - linedup at Pos 40 #pragma compile(UPX, False) ; comment - linedup at Pos 40 ;~ au3.keywords.preprocessor=#ce #comments-end #comments-start #cs #include #include-once \ ;~ #notrayicon #onautoitstartregister #requireadmin #NoTrayIcon ; comment - linedup at Pos 40 #RequireAdmin ; comment - linedup at Pos 40 #OnAutoItStartRegister "test" ; comment - linedup at Pos 40 ; -- Special treatment in au3lexer #cs test ; comment Start - copy all after #CS to #CE #ce test ; will be replaced #comments-Start ; comment Start copy all after #CS to #CE #comments-end ; will be replaced ; Knows Direcitves/Special table -> autoit3wrapper.keywords.properties #AutoIt3Wrapper_Add_Constants=n ; comment - linedup at Pos 40 #Au3Stripper_Ignore_Variables ; comment - linedup at Pos 40 #Tidy_Parameters=1 ; comment - linedup at Pos 40 After Tidy run: #Tidy_ILC_Pos=40 #UnknowDirective test ; comment ; Know directives/preprocessor Table -> au3.keywords.properties ;~ au3.keywords.special=#endregion #forcedef #forceref #ignorefunc #pragma #region #Region test ;test ; comment there not enough spaces, so simply copy Eveything after #Region to #EndRegion #EndRegion test ;test ; comment there not enough spaces, so simply copy Eveything after #Region to #EndRegion #Region test ; comment there are 4 spaces after #region so can line it up with EndRegion #EndRegion test ; comment there are 4 spaces after #region so can line it up with EndRegion #forcedef aaaaaa ; comment - linedup at Pos 40 #pragma compile(UPX, False) ; comment - linedup at Pos 40 ;~ au3.keywords.preprocessor=#ce #comments-end #comments-start #cs #include #include-once \ ;~ #notrayicon #onautoitstartregister #requireadmin #NoTrayIcon ; comment - linedup at Pos 40 #RequireAdmin ; comment - linedup at Pos 40 #OnAutoItStartRegister "test" ; comment - linedup at Pos 40 ; -- Special treatment in au3lexer #cs test ; comment Start - copy all after #CS to #CE #ce test ; comment Start - copy all after #CS to #CE #comments-start ; comment Start copy all after #CS to #CE #comments-end ; comment Start copy all after #CS to #CE ; Knows Direcitves/Special table -> autoit3wrapper.keywords.properties #AutoIt3Wrapper_Add_Constants=n ; comment - linedup at Pos 40 #Au3Stripper_Ignore_Variables ; comment - linedup at Pos 40 #Tidy_Parameters=1 ; comment - linedup at Pos 40 I like to thank @mLipok for the testing/ideas/questions during the development of this change. Jos
-
Merged the SciTE 3.7.3 source into our version and several other changes and fixes to the supporting utilities. Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 24-2-2017 *** Merged the SciTE v 3.7.3 by Neil Hodgson with our own version of SciTE. (Jos) *** Updated AutoIt3Wrapper v17.224.935.0 (Jos) - 16.612.1119.1 Fixed #AutoIt3Wrapper_Run_Stop_OnError=N, avoiding to stop even when No or not specified. - 16.612.1119.2 Fixed #AutoIt3Wrapper_Run_Stop_OnError=N, avoiding to stop even when No or not specified. - 16.612.1119.3 Added warning for #AutoIt3Wrapper_UseX64 in case #pragma(out,..) is used. *** Updated Au3Stripper v17.224.935.0 (Jos) - 16.612.1119.1 Fixed issue which sometimes was stripping a global const incorrectly - 16.612.1119.2 Fixed /maxiterations parameter not recognised - 16.612.1119.3 Fixed increased the max #Au3Stripper_Ignore_Variables to 500 and for #Au3Stripper_Ignore_Funcs to 200 - 16.612.1119.4 Fixed regression introduced in 16.612.1119.1 *** Updated SciTEConfig v17.224.935.0 (Jos) - 16.306.1119.1 ... *** Updated Tidy v17.224.935.0 (Jos) - 16.612.1119.1: Fixed Sort_Func function bug when the source contains a BOM. *** Updated CodewiZard v1.5.4.0 (Cyberyeye) - Fix Icon Ressource Number for Messagebox Tab & ToolTip Tab - Check/Fix missing includes using AutoIt3Wrapper_Add_Constants=y - Added Opt("MustDeclareVars", 1) to fix undeclared variables - Replaced msgbox() magic number by constant name - Added GUISetIcon var (au3.ico) - Removed unusefull old AutoIt3Wrapper directive *** Updated Abbreviations (mLipok) - Updated au3abbrev.properties and helpfile page. -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the online documentation for an overview of all extra's you get with this installer.
- 23 replies
-
- scite
- scite4autoit3
-
(and 3 more)
Tagged with:
-
Hello, Is there a way to change the backup pattern for Tidy ? Actually it goes by <Myfile>.au3 becomes <MyFile>_old<x>.au3. I would like it to be <Myfile>.au3 becomes <MyFile> v<x>.au3. Thanks. Gilles
-
Text translated from Portuguese by google - please apologize for any errors After using the first 15 lines are replaced I'm using autoitdebug and made the new update installation of v3.3.14.2 autoit And Tidy AutoIt3 v2.3.0.8 Copyright (c) Jos van der Zande March 24, 2013 After using it incere 15 lines containing: e|_WinNet_GetUser|_WinNet_OpenEnum|_WinNet_RestoreConnection|_WinNet_UseConnection|_Word_Create|_Word_DocAdd|_Word_DocAttach|_Word_DocClose|_Word_DocExport|_Word_DocFind|_Word_DocFindReplace|_Word_DocGet|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| num|_WinNet_RestoreConnection|_WinNet_UseConnection|_Word_Create|_Word_DocAdd|_Word_DocAttach|_Word_DocClose|_Word_DocExport|_Word_DocFind|_Word_DocFindReplace|_Word_DocGet|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| DocAttach|_Word_DocClose|_Word_DocExport|_Word_DocFind|_Word_DocFindReplace|_Word_DocGet|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| d|_Word_DocFindReplace|_Word_DocGet|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| Get|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| t|_Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| _Word_DocLinkAdd|_Word_DocLinkGet|_Word_DocOpen|_Word_DocPictureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| ureAdd|_Word_DocPrint|_Word_DocRangeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| angeSet|_Word_DocSave|_Word_DocSaveAs|_Word_DocTableRead|_Word_DocTableWrite|_Word_Quit| Replacing my script What went wrong
-
11-3-2016: Uploaded a new SciTE4AutoIt3.exe. Merged the SciTE 3.6.2 source into our version and several other changes and fixes to the supporting utilities. Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 6-3-2016 *** Merged the SciTE v 3.6.2 by Neil Hodgson with our own version of SciTE. (Jos) *** Updated AutoIt3Wrapper v16.306.1237.0 (Jos) - 15.920.938.2 removed the check for utf8 for au3check as that is supported - 15.920.938.3 Reverted __ConsoleWrite() to ConsoleWrite for ShowStdOutErr() - 15.920.938.4 added info for codepage and utf8 check to header. - 15.920.938.5 Only warn about #RequireAdmin for Run option. - 15.920.938.6 fixed issue when these were used together: #AutoIt3Wrapper_Run_Au3Stripper=y #AutoIt3Wrapper_Res_SaveSource=Y - 15.920.938.8 Modifications from DickG for the GUI Control locations and sizes to fit other screen sizes. *** Updated Au3Stripper v16.306.1237.0 (Jos) - 15.920.938.2 Fixed error line number for statements using unresolved func name Added logic to remove the () behind the Func in case of this type of lines: Call(Example3(), 'fff') NewFoundWord$ is then="Example3()" - 15.920.938.3 Added minus sign support to preexpand variables. - 15.920.938.4 Fixed crash in the get firstword logic to limit the returned length to 500. - 15.920.938.5 Fixed /PE replacing the variable in a For $x= statement. *** Updated SciTEConfig v16.306.1237.0 (Jos) - 15.920.938.1 hide/unhide when opening Tidy.ini to avoid a hidden msgbox hanging SciTEConfig.au3 - 15.920.938.2 Added the creation of includes.txt for AutoComplete Standard UDFs when "#include" is typed. - 15.920.938.3 Fixed for CallTip not always updating correctly. *** Updated Tidy v16.306.1237.0 (Jos) - 15.920.938.1 Fixed issue with space removal between [ and Then - 15.920.938.2 #forceref and #forcedef now also tidied. - 15.920.938.3 Enfoces a single space between end-of-line and inline comment - 15.920.938.4 Fixed regression extra space between EndFunc and #EndRegion and the added comments. -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the newly formatted the online documentation for an overview of all extra's you get with this installer.
- 10 replies
-
- scite4autoit3
- tidy
-
(and 2 more)
Tagged with:
-
I believe I have found a bug in the latest version of Tidy, which I have downloaded from the Scite4Autoit website. Tidying the following code If $a[1 - function('')] Then ElseIf $a[fucntion()] Then ElseIf $a[(0)] Then ElseIf $a[function() - 0] Then ElseIf $a[function(0)] = 1 Then EndIfwill erase the whitespace between the closing brackets and the then keyword whenever the last expression is a function. This also occurs on ElseIf lines, and results in this code: If $a[1 - function('')]Then ElseIf $a[function()]Then ElseIf $a[(0)]Then ElseIf $a[function() - 0] Then ElseIf $a[function(0)] = 1 Then EndIfWhich does not run. Should I submit a bug report on the autoit bugtracker? For now I can either use the #Tidy_on and #Tidy_off directives to skip these lines so that the source actually runs.
-
How would I go about adding the following to every function, after calling Tidy? Is it a hard process? I would want it to fill in: Name of the functionParameters Variable Names from the function, and put them in place - adding more parameter spaces as neededFill in the created date; #FUNCTION# ==================================================================================================================== ; Name ..........: $NameOfFunction ; Description ...: ; Syntax ........: ; Parameters ....: $Param_1 ; $Param_2 ; $Param_3 ; Return values .: ; Author ........: ; Created .......: ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; ===============================================================================================================================; Also, was wondering, how hard it would be to create another tool, as I seem to always want to see the values being sent to a function, maybe a HotKey (script) that can put a MessageBox box/ConsoleWrite at the top off all the functions (or at least the one high lighted? With the name of the function as title, and each parameter/variable in the header, put its name and value on separate lines. EDIT Or the syntax of a UDF - do not remember where that is, but will see if I can find it. EDIT 2 Found this, I assume it should be added, so when I find it, I guess I will https://www.autoitscript.com/wiki/Best_coding_practices
-
Is there any limit in function name length for TIDY ? I want to sort functions in this UDF {attachment removed - quota cleanup} And I see that function named: _QPDF_Example_Commercial_1..... _QPDF_Example_Commercial_2..... _QPDF_Example_Commercial_3..... .... are not sorted correctly. mLipok
-
REPRO: Func _test() $sdlugosc = '' $sDlugosc = 1 ; here ; Why after using TIDY the UPPER leter D is changed to LOWER letter D EndFunc ;==>_test HOW TO: Try to use Tidy in SciTE Watch on big letter "D" QUESTION: Why after using TIDY the UPPER leter D is changed to LOWER letter D ? Attachment: my test file EDIT: typo TEST_TIDY_lowercase_issue.au3
-
1/22/2014: re-Uploaded a new SciTE4AutoIt3.exe installer with the new SciTE v3.3.7 release. This version contains a version of AutoIt3Wrapper and SciTEConfig which are recompiled with AutoIt3 v 3.3.10.2 to avoid te hardcrash with Athlon CPU's. There are a couple of major changes: - Updated our version of SciTE from 3.3.6 to 3.3.7 - AutoIt3Wrapper will now use "c:users<userName>AppdataLocalAutoit v3Aut2Exe" as Temp directory. - Updated syntax files. Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 01/22/2014 *** Updated AutoIt3Wrapper v2.1.4.5 (Jos) - Fixed issue with undecleared variable error when using /Versioning_Commit - Recompiled with version 3.3.10.2 because 3.3.10.0 could give a hardcrash. *** Updated SciTEConfig v1.6.11.1 (Jos) - Recompiled with version 3.3.10.2 because 3.3.10.0 could give a hardcrash. -------------------------------------------------------------------------------------------------- 12/29/2013 *** Fixed missing SciTEConfig in SciTE4AutoIt3 installer. -------------------------------------------------------------------------------------------------- 12/28/2013 *** Merged the updates of SciTE v 3.3.7 by Neil Hodgson with our own version of SciTE. (Jos) *** Updated Production config files to 3.3.10.0 *** Updated AutoIt3Wrapper v2.1.4.0 (Jos) - Use "c:\users\<userName>\Appdata\Local\Autoit v3\Aut2Exe" as Temp directory for compiling and resource updating like aut2exe. - Fixed issue with Compile both and Pragma(x64,true) - Fixed inputfile in case Obfuscator needs to run but is skipped due to unsupported utf format. - Fixed UPX selection option to default to N and adding the Directive when checkbox is checked. *** Updated Obfuscator.exe v1.0.31.1 (Jos) - Changed the code to leave #include statements that include a a3x file. -------------------------------------------------------------------------------------------------- 11/14/2013 *** Merged the updates of SciTE v 3.3.6 by Neil Hodgson with our own version of SciTE. (Jos) - Added check to avoid double shelling of the script via shortcuts of the tools menu items. - Added Properties option to set the default encoding of new files: NewFileEncoding=CodePage/UTF8/UTF8BOM/UTF16BE/UTF16LE - Fixed issue in AU3 lexer to show the last correctly when the previous line is a commentline, commentblock, Special and Directives. *** Updated AutoIt3Wrapper v2.1.3.0 (Jos) - Fixed issue where a tempfile was left behind when files was checked by au3check and UTF encoded. - Added support for the #PRAGMA statement to avoid any conflicts. Warnings are now displayed in the Console output. - Added SciTE version to the displayed info in the Console Output. - Added #AutoIt3Wrapper_Res_Remove (wraithdu) - Added File compression for Resource Files (wraithdu) #AutoIt3Wrapper_Res_File_Add=%in%, 10, UNCOMPRESSED #AutoIt3Wrapper_Res_File_Add=%in%, -10, COMPRESSED - Updated option to change the TempDir in the INI file. Default changed to @UserProfileDir. (wraithdu) - Fixed adding /Beta to the Obfuscator line when using the /Beta on the commandline of Autoit3wrapper. - Fixed to ensure UPX is ran when needed. - Fixed: Allow | in run_before and Run_After directives. *** Updated Tidy v2.4.0.0 (Jos) - Added support for 3.3.9.x changes. - Changed default EOF setting to add the CRLF. (End_With_NewLine=1) - Fixed removal of spaces for new Var/Func notation - Fixed crash caused by Function table load. *** Updated SciTEConfig v1.6.11.0 - Updates for Abbrev manager and User Calltip Manager (Melba23) *** Updated Obfuscator.exe v1.0.31.0 (Jos) - Fixed ensure #pragma statements are not stripped. - Fixed Regression internal code cleanup done before. The Obfuscation was broken - Fixed #include logic for #Include not first checking the Directory where the file containing the include is located. - Added check for max 4100 character record len without causing a crash. *** Added support for personal LUA functions. Look at "PersonalTools.lua" in your @UserProfileDir subdir for details. *** Updated SciTEJump to the latest version v2.13.103.227 (guinness) -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE/Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the online documentation for an overview of all extra's you get with this installer.
- 189 replies
-
- Tidy
- Obfuscator
-
(and 3 more)
Tagged with:
-
..so I got Notepad++ but was not working with the xml printing plugin, the online beautifiers would no work all the time, and I wanted like Tidy does with tabs so it looks nice in Scite to look at the code and make my own template for a script I'm working on....very frustrating and time consuming, so, I put this code together. I get in a 10th of a sec. the xml prettified vs. minutes and frustration. Anyway, how I use it is I drag and drop the word doc. ( saved in XML format ) to scite , copy to the clipboard ( ctrl-A, ctrl-C ) , switch to this code, press F5 and I'm happy If Not StringInStr($CmdLineRaw, "/ErrorStdOut") And Not @Compiled Then Exit MsgBox( 262144 , @ScriptName, "please run from Editor", 10) Local $s = ClipGet() If Not StringInStr($s, '<?mso-application progid="Word.Document"?>') Then Exit MsgBox(262144, StringTrimRight(@ScriptName, 4), "tested only in Word.Document XML" & @CR & @CR & "no changes made to clipboard", 20) Local $sOut = msWordXML_Beautify($s, 2) ; 2=return as beautified string, 1=ConsoleWrite beautified string, 0=return beautified array ClipPut($sOut) MsgBox(262144, StringTrimRight(@ScriptName, 4), "clipboard content replaced by beautified XML", 2) Func msWordXML_Beautify($s, $iEcho = 0) Local $iTimer = TimerInit() $s = StringReplace($s, @CR, '') $s = StringReplace($s, @LF, '') Local $a = StringSplit($s, "<") Local $b[$a[0] * 2] Local $i = 0, $c = "" For $x = 1 To $a[0] If StringReplace($a[$x], @TAB, "") = "" Then ContinueLoop If StringInStr($a[$x], ">") Then $a[$x] = StringReplace($a[$x], @TAB, '') $c = StringSplit($a[$x], ">") If UBound($c) < 2 Then ContinueLoop For $y = 1 To $c[0] If $y = 1 Then $i += 1 $b[$i] = "<" & $c[$y] & ">" Else If $c[$y] = "" Then ContinueLoop $i += 1 $b[$i] = $c[$y] EndIf Next Next ReDim $b[$i + 1] $b[0] = $i For $x = 3 To $b[0] If Not StringInStr($b[$x - 1], ">") Then $b[$x] = $b[$x - 2] & $b[$x - 1] & $b[$x] $b[$x - 2] = "<>" $b[$x - 1] = "<>" EndIf Next Dim $c[$b[0] + 1] $i = 0 For $x = 1 To $b[0] If $b[$x] = "<>" Then ContinueLoop $i += 1 $c[$i] = $b[$x] Next $b = $c $c = "" ReDim $b[$i + 1] $b[0] = UBound($b) - 1 Local $tabs = "" For $x = 1 To $b[0] $b[$x] = StringStripWS($b[$x], 3) If StringLeft($b[$x], 2) = "<!" Then ContinueLoop If StringLeft($b[$x], 2) = "<?" Then ContinueLoop If StringLeft($b[$x], 1) = "<" And StringRight($b[$x], 2) = "/>" Then $b[$x] = $tabs & $b[$x] ContinueLoop EndIf If StringLeft($b[$x], 2) = "</" And StringRight($b[$x], 1) = ">" Then $tabs = StringTrimRight($tabs, 1) $b[$x] = $tabs & $b[$x] ContinueLoop EndIf If StringLeft($b[$x], 1) = "<" And StringRight($b[$x], 1) = ">" And Not StringInStr($b[$x], '</') Then $b[$x] = $tabs & $b[$x] $tabs &= @TAB ContinueLoop EndIf $b[$x] = $tabs & $b[$x] Next ConsoleWrite('+ msWordXML_Beautify done in about ' & Round(TimerDiff($iTimer), 5) & ' mSec.' & @CRLF) Local $sOut = "" If $iEcho Then For $x = 1 To $b[0] If $iEcho = 1 Then ConsoleWrite( $b[$x] & @CRLF ) Else $sOut &= $b[$x] & @CRLF EndIf Next EndIf If $iEcho = 2 Then Return $sOut Return $b EndFunc ;==>msWordXML_Beautify ..hope it saves time to someone. Edit 1: it works nice with <?mso-application progid="Excel.Sheet"?>, it may just work with any XML, no clue. Edit 2: fixed an error in the code
-
I have been getting this error intermittently for some time now. What needs to be done to correct it? Problem signature: Problem Event Name: APPCRASH Application Name: tidy.exe Application Version: 2.1.0.0 Application Timestamp: 4b40b8c4 Fault Module Name: tidy.exe Fault Module Version: 2.1.0.0 Fault Module Timestamp: 4b40b8c4 Exception Code: c0000005 Exception Offset: 00007da2 OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 1033 Additional Information 1: c7e4 Additional Information 2: c7e49971299fe8de6fe308282ae1b48c Additional Information 3: a4a3 Additional Information 4: a4a392b847be5cfdc9a1dc4aff47bd26 All help appreciated. Thanks in advance REB
-
Referring to: and /?do=embed#entry1102929'' frameborder='0' data-embedContent>> I would like to present AU3 Tools - Quick Updater : Global $URL_Scite = 'http://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/' _INET_DownloadIfNotEqual("AutoIt3Wrapper.exe") _INET_DownloadIfNotEqual("Obfuscator.exe") _INET_DownloadIfNotEqual("SciTE.exe") _INET_DownloadIfNotEqual("SciteConfig.exe") _INET_DownloadIfNotEqual("Tidy.exe") _INET_DownloadIfNotEqual("SciLexer.dll") Func _INET_DownloadIfNotEqual($fFileToDownlad) Local $fLocalDestination If _INET_CompareSize_IsEqual($fFileToDownlad) = False Then $fLocalDestination = _INET_GetUpdate($fFileToDownlad) FileMove($fLocalDestination, @ScriptDir & '\' & $fFileToDownlad, 1) EndIf EndFunc ;==>_INET_DownloadIfNotEqual Func _INET_CompareSize_IsEqual($fFileToDownlad) Local $nWebSize = InetGetSize($URL_Scite & $fFileToDownlad) Local $nLocalSize = FileGetSize(@ScriptDir & '\' & $fFileToDownlad) If $nWebSize = $nLocalSize Then Return True Else Return False EndIf EndFunc ;==>_INET_CompareSize_IsEqual Func _INET_GetUpdate($fFileToDownlad) Local $fLocalDestination = @TempDir & "\" & $fFileToDownlad Local $hDownload = InetGet($URL_Scite & $fFileToDownlad, $fLocalDestination, 1, 1) Do Sleep(250) Until InetGetInfo($hDownload, 2) ; Check if the download is complete. Local $nBytes = InetGetInfo($hDownload, 0) InetClose($hDownload) ; Close the handle to release resources. Return $fLocalDestination EndFunc ;==>_INET_GetUpdate HOW TO USE: Simply compile and run waiting to download current updates tools If You want to replace file in SciTE4AutoIt dir then run it script from directory where SciTE4AutoIt is instaled ps. This is a really fast set up, update tool contains no error checking requires no configuration requires that the target downloaded files were not used by other Windows processes EDIT: CAUTION: EDIT: WORD JOKE : as they say on the commercial "before use, read the label or contact your doctor or pharmacist"
-
Today I had a problem with TIDY cause my script turns off TIIDY. After analyzing the problem solved here is the summary: This is a reproduction script. #Tidy_Parameters=/sort_funcs Func _test() Select Case 1 if $test = True $string = "" Then EndSelect EndFunc i know there is a issue if $test = True $string = "" Then it must be that #Tidy_Parameters=/sort_funcs Func _test() Select Case 1 if $test = True then $string = "" Endif EndSelect EndFunc but please try to TIDY this one: #Tidy_Parameters=/sort_funcs Func _test() Select Case 1 if $test = True $string = "" Then EndSelect EndFunc now comment TIDY sorting and run TIDY again ;~ #Tidy_Parameters=/sort_funcs Func _test() Select Case 1 if $test = True $string = "" Then EndSelect EndFunc EDIT: I know this is not nearly as important as TIDY correctly points out errors through appropriate messages on the console. But however you may be interested.
-
How I see in http://www.autoitscript.com/autoit3/scite/docs/Tidy.html There is an option that is enabled by default. I have to honestly say that I like it. Then I began to wonder: Is a similar functionality can be added to other functions available in AutoIT. Here is an example of what would be the result of my proposal. #include <MsgBoxConstants.au3> Func _Test_comment_1() ; comment example for Func and EndFunc Local $sString = "" If $sString > 0 Then ; comment using IF Then MsgBox($MB_SYSTEMMODAL, "", "Value is positive.") ElseIf $sString < 0 Then MsgBox($MB_SYSTEMMODAL, "", "Value is negative.") Else ; comment using IF Then If StringIsXDigit($sString) Then MsgBox($MB_SYSTEMMODAL, "", "Value might be hexadecimal!") Else MsgBox($MB_SYSTEMMODAL, "", "Value is a string.") EndIf EndIf ; comment using IF Then Local $sMsg = "" Switch @HOUR ; comment using switch Case 6 To 11 $sMsg = "Good Morning" Case 12 To 17 $sMsg = "Good Afternoon" Case 18 To 21 $sMsg = "Good Evening" Case Else $sMsg = "What are you still doing up?" EndSwitch ; comment using switch Local $iValue = 0 Local $sBlank = "Test" Select ; comment using Select Case $iValue = 1 MsgBox($MB_SYSTEMMODAL, "", "The first expression was True.") Case $sBlank = "Test" MsgBox($MB_SYSTEMMODAL, "", "The second expression was True") Case Else ; If nothing matches then execute the following. MsgBox($MB_SYSTEMMODAL, "", "No preceding case was True.") EndSelect ; comment using Select Local $oExcel = ObjCreate("Excel.Application") $oExcel.visible = 1 $oExcel.workbooks.add With $oExcel.activesheet ; comment using With .cells(2, 2).value = 1 .range("A1:B2").clear EndWith ; comment using With Local $i = 0 While $i <= 10 ; comment using While MsgBox($MB_SYSTEMMODAL, "", "Value of $i is: " & $i) $i = $i + 1 WEnd ; comment using While Do ; comment using Do Until ExitLop Until 1 ; comment using Do Until EndFunc ;==>_Test_comment_1 I think it would be very useful especially in the case when the functions are nested. like here If False Then ; Comment assigned to External "IF THEN" ;..... If True Then ; Comment assigned to Central "IF THEN" ;..... Else ; Comment assigned to Central "IF THEN" ;..... If True Then ; Comment assigned to Internal "IF THEN" ;..... Else ; Comment assigned to Internal "IF THEN" ;..... EndIf ; Comment assigned to Internal "IF THEN" ;..... EndIf ; Comment assigned to Central "IF THEN" ;..... Else ; Comment assigned to External "IF THEN" ;..... EndIf ; Comment assigned to External "IF THEN" Jos: What You thik about that ? EDIT: add tag to the thread
-
I had a problem with the directive # region # endregion Here I present a brief example of malfunction TIDY (or at least I think) #region testing1 #endregion testing1 #region-testing2 #endregion testing1