Jump to content

New Beta Tidy.exe


Jos
 Share

Recommended Posts

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

It crashes for me too so I will have a look at it to see what is happening.

This is the description I put on the first page for this feature...does that explain it?

OK, yes, explains it well. And thanks for everything Jos!

Oh crap I just now saw this: "Parameter /prc or /properconstants support is added for this function because it will slow down the Tidy process and by default it is off"

*facepalm*

Edited by jaberwocky6669
Link to comment
Share on other sites

I think I found another one?

In the #endregion comments tidy changes "End" to "Start". I use Tidy 2.2.0.7

Before Tidy:

#region ---Au3Recorder generated code Start ---

#region --- Internal functions Au3Recorder Start ---
Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc
#endregion --- Internal functions Au3Recorder End ---

#endregion --- Au3Recorder generated code End ---

After Tidy:

#region ---Au3Recorder generated code Start ---

#region --- Internal functions Au3Recorder Start ---
Func _WinWaitActivate($title, $text, $timeout = 0)
    WinWait($title, $text, $timeout)
    If Not WinActive($title, $text) Then WinActivate($title, $text)
    WinWaitActive($title, $text, $timeout)
EndFunc ;==>_WinWaitActivate
#endregion --- Internal functions Au3Recorder Start ---

#endregion ---Au3Recorder generated code Start ---

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

No, it's working correctly. it changes the #endregion line to match the #region comment. I believe this behavior can be disabled in the ini. Ok, well, no it isn't the INI but it's somewhere I'm sure of it.

Edited by jaberwocky6669
Link to comment
Share on other sites

  • Developers

Working as designed. to avoid this behavious change this line in Tidy.ini:

Skip_EndRegion_Comment=1

or add option to the #tidy_parameters:

/Skip_EndFunc_Comment or /sefc

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

  • 2 weeks later...

'nother bug?

Latest beta from October/03/2010

here is my full Tidy.ini

[ProgramSettings]
*** Indent 0=Tabs >0=Number of Space
tabchar=0

*** Update Functions/Keywords/Macros/UDFs to Proper case
proper=1

*** Update Constants defined in the "constant Include files"
properconstants=1

*** Update Variables to: 1=LowerCase; 2=UpperCase; 3=First Dim/Local/Global or "First_Seen" Case
vars=3

*** Update Spaces around Delimiters
delim=0

*** Added comment to EndFunc statement e.g. "EndFunc ;==>UDF_Name"
endfunc_comment=1

*** Generate Documentation file for the Program and optionally Display it with Notepad at the end ot the Tidy run
Gen_Doc=0
Gen_Doc_Show=0

*** Keep x Version of the File before the Tidy run and optionally store them in SubDirectory "\Backup" 
KeepNVersions=5

*** Target backup directory which defaults to Scriptdir\Backup. Any other directory needs to exist or else it will use the default directory!
backupDir=

*** Remove Empty lines from Script Source
Remove_Empty_Lines=

*** 1=Show Tidy Errors in Console 9=Debug Output
ShowConsoleInfo=

*** 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%"

_UsefullFunction( "String" )

Becomes -->

_UsefullFunction("String" )

Also

_UsefullFunction ( "String" )

Becomes -->

_UsefullFunction("String" )

Also

_UsefullFunction ( $variable )

Becomes -->

_UsefullFunction( $variable )

It still does it but it's cool, don't worry about it.

Edited by jaberwocky6669
Link to comment
Share on other sites

As I recall that is the expected behavior with

delim=0

That is unless there has been a substantial change that I missed.

delim=1

would have made your first example

_UsefullFunction ( "String" )

What I'm not sure about is the trailing space after the "string" but that may also be "as designed".

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

As I recall that is the expected behavior with

That is unless there has been a substantial change that I missed.

delim=1

would have made your first example

_UsefullFunction ( "String" )

What I'm not sure about is the trailing space after the "string" but that may also be "as designed".

I forgot to mention that I have delim=0

You would think that it would keep the spaces but it doesn't.

Edited by jaberwocky6669
Link to comment
Share on other sites

So you mean that you interpret delim=0 as meaning "Don't touch my spaces". I think they interpret it differently in Holland and I must be part Dutch but my mother never revealed that to me.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

Looks somewhat strange indeed but this is what the previous version also did.

I am wondering what the expected behaviour should be.

Input:

#tidy_parameters= /delim=0
_UsefullFunction( "String" )
_UsefullFunction( $String )
_UsefullFunction ( "String" )
_UsefullFunction ( $String )
$a=1
$a = 1
$a    =     1

With Delim=0 should become:

#tidy_parameters= /delim=0
_UsefullFunction( "String" )
_UsefullFunction( $String )
_UsefullFunction( "String" )
_UsefullFunction( $String )
$a=1
$a = 1
$a    =     1

With Delim=1 should become:

#tidy_parameters= /delim=1
_UsefullFunction("String")
_UsefullFunction($String)
_UsefullFunction("String")
_UsefullFunction($String)
$a = 1
$a = 1
$a = 1

right?

Edited by Jos
expanded the example

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

  • Developers

So you mean that you interpret delim=0 as meaning "Don't touch my spaces". I think they interpret it differently in Holland and I must be part Dutch but my mother never revealed that to me.

Geezzzzz..... You are really pushing it here ...aren't you?

Sometimes I wish I left out most of these type of options and just format the script with the defaults only. ;)

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

The reason I think that it is a bug is because when the function argument is a string then it deletes the space. When the argument is a variable it leaves the space behind.

_UsefullFunction( "String" )
_UsefullFunction( $String )
_UsefullFunction ( "String" )
_UsefullFunction ( $String )

With Delim=0 should stay the same:

; delim=0 shouldn't touch any space at all
_UsefullFunction( "String" )
_UsefullFunction( $String )
_UsefullFunction ( "String" )
_UsefullFunction ( $String )

With Delim=1 should become:

; yes, my I would imagine that delim=1 would take away all spaces
_UsefullFunction("String")
_UsefullFunction($String)
_UsefullFunction("String")
_UsefullFunction($String)

Don't touch my private spaces ;)

Edited by jaberwocky6669
Link to comment
Share on other sites

  • Developers

The reason I think that it is a bug is because when the function argument is a string then it deletes the space. When the argument is a variable it leaves the space behind.

I agree it is not consequent and will look at it, but do you agree with what I suggested?

I never set the Delim to 0 because I like it to be tidied as well.

Expanded the example .....

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

I agree it is not consequent and will look at it, but do you agree with what I suggested?

I never set the Delim to 0 because I like it to be tidied as well.

I love to line things up especially long lists of constants

I edited my previous post

Edited by jaberwocky6669
Link to comment
Share on other sites

Sometimes I wish I left out most of these type of options and just format the script with the defaults only. :)

Well, it's cool if you don't want to bother with it. Just thought you'd be interested.;)

Link to comment
Share on other sites

  • Developers

Well, it's cool if you don't want to bother with it. Just thought you'd be interested.;)

No problem and found the issue with the space being removed in front of the literal string.

Not sure I agree on the space removal between the FuncName and the parentheses as that is part a the Func and not really a Delimiter as such.

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

No problem and found the issue with the space being removed in front of the literal string.

Not sure I agree on the space removal between the FuncName and the parentheses as that is part a the Func and not really a Delimiter as such.

Jos

Awesome, how much do I owe you for all of your hardwork? Hah, I guess I can be a pain from time to time. Sorry about that. Anyways, I would like to thank Jon first of all for so graciously giving us AutoIt free of charge. I would also like to thank you for giving us all of these awesome SciTE utilities that make using AutoIt such a pleasure!

Yes, the space between the Func and parens was a little over the top but I put it out there anyways just in case.

Link to comment
Share on other sites

Geezzzzz..... You are really pushing it here ...aren't you?

Come on now. We both know that I would never do that. ;)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...