Jump to content

Tidy error After using the first 15 lines are replaced


odaylton
 Share

Recommended Posts

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
 

Link to comment
Share on other sites

  • Developers
40 minutes ago, odaylton said:

Tidy AutoIt3 v2.3.0.8 Copyright (c) Jos van der Zande March 24, 2013

I would need the source you use to replicate your issue, but first update to the latest version of SciTE4AutoIt3 since this version is more than 3 years old!

Jos

PS: not need to PM me with a link unless I haven't responded with a couple of days. ;)

Edited 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

Okay, it was only update that solved the problem ... Sorry for the silly.
I do not know why it was such an old version ...
Another topic:
Really tidy is wonderful but I have a small suggestion for an improvement.
Create programs since 1985 for personal use and recently (2010) adopted by the Autoit meet as my way of thinking
With my experience I created certain documentation habits for my development.
Mainly because of resuming old projects months after starting.
So the reading programs should be something easier.
For example:

MsgBox(Default,"Impossivel Continuar",  "Favor incerir um titulo" & @CRLF & "Quarquer duvida entrar em contato" & @CRLF & $Contato, 15, Default)

I could stay so for readability.

MsgBox( Default, _      ; flag
        "Impossivel Continuar", _ ;"title"
        "Favor incerir um titulo" & @CRLF & _
        "Quarquer duvida entrar em contato" & @CRLF & _
        $Contato, _     ; "text"
        15, _           ;[, timeout
        Default)        ;[, hwnd]])

Note that in all "," I add, "_; function argument's comment "+ [line break] (obtained by help texts)
Also note that every "& @CRLF &" I would add "& @CRLF & _" + [line break]
I wonder what you think and if there is an easy way to change the tidy so you can at least adjust here and make it more practical for me
Another suggestion is that when the tidy is a new function with its arguments would appear a dialog window asking for comments for each field.
thus generating the UDF documentation
Examples:

Global $NomeProjeto = "", _     ;nome da pasta
        $DirProjeto = "", _     ;path da pasta
        $PastaProjeto = "", _   ;caminho sem o drive (usado em _PathMake)
        $DriveProjeto           ;letra do drive da pasta(usado em _PathMake)

Global $JanelaAtiva[10] ;Dados da janela ativa atual
;[0] Handle
;[1] PID    Processo ID
;[3] Path
;[4] Titulo
;[5] file name process
;[6] XCentro
;[7] yCentro
;[8] ContolID
;[8] ClassControl
;[9] InnstanceControl
ToolTip(    "Digitando[" & $Testo & "]" & @CRLF & _
            "Aguarde os testes...", _   ; Testo
            Default, Default, _         ; coordenadas do mouse
            "Testando o Campo", _       ; Titulo do Tip
            2, _                        ; Icone
            5)                          ;1+4 Baloon e sempre Visível

In the case of UDF
Ex

; #INTERNAL_USE_ONLY# ===========================================================================================================
; Name...........: __ArrayDualPivotSort
; Description ...: Helper function for sorting 1D arrays
; Syntax.........: __ArrayDualPivotSort ( ByRef $aArray, $iPivot_Left, $iPivot_Right [, $bLeftMost = True ] )
; Parameters ....: $aArray  - Array to sort
;                  $iPivot_Left  - Index of the array to start sorting at
;                  $iPivot_Right - Index of the array to stop sorting at
;                  $bLeftMost    - Indicates if this part is the leftmost in the range
; Return values .: None
; Author ........: Erik Pilsits
; Modified.......: Melba23
; Remarks .......: For Internal Use Only
; Related .......:
; Link ..........:
; Example .......:
; ===============================================================================================================================
Func __ArrayDualPivotSort(ByRef $aArray, $iPivot_Left, $iPivot_Right, $bLeftMost = True)


I would do the following:

Func __ArrayDualPivotSort(  ByRef $aArray, _    ; Array to sort 
                            $iPivot_Left, _     ; Index of the array to start sorting at
                            $iPivot_Right, _    ; Index of the array to stop sorting at
                            $bLeftMost = True)  ; Indicates if this part is the leftmost in the range
;#INTERNAL_USE_ONLY# ===========================================================================================================
; Name...........: __ArrayDualPivotSort
; Description ...: Helper function for sorting 1D arrays
; Return values .: None
; Author ........: Erik Pilsits
; Modified.......: Melba23
; Remarks .......: For Internal Use Only
; Related .......:
; Link ..........:
; Example .......:
; ===============================================================================================================================


I hope this idea will inspire you to this new challenge.
Thanks for listening
 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...