Jump to content

Tidy - full description of options


Recommended Posts

  • Moderators

ineedh3lp,

Although not privy to the inner workings of Tidy, I feel that putting a directive in the middle of a line (which is effectively what you are doing in the second snippet) is asking for trouble. :graduated:

Putting the directive before the line (as in the first snippet) works well as you can see. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

but if I move #Tidy_Off after a continued line:

Local $HelpStr = _
        #Tidy_Off
        "AAA" & _
        "BBB" & _
        "CCC"
#Tidy_On

Did you try running it with AutoIt3 ? :graduated:

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

Blue_Drache:

:graduated: what?

There are no special tidy options related to compiling. There is only the '#AutoIt3Wrapper_Run_Tidy=Y' directive to make tidy run on your source automatically when compiling(or building) your executable. (and when just running your code to.)

#Tidy_Parameters = /pr 1 /tc 0 /gd 0 /rels 1 /sci 1

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Yep, That's the Tidy directive you can use in your code to override the current Tidy option set in the Tidy ini configuration file. Uses the same options as already documented. (and those options your using are just the short version of some of the available commands.)

Strait from SciTe4AutoIT3 Help: (as this seem to be what your looking for.)

/proper or /pr=0/1
/updatevars or /uv=1/2/3 
/tabchar or /tc=0
/gen_doc or /gd
/r_empty_lines or /rel 
/r_extra_empty_lines or /reel 
/showconsoleinfo=0/1/9 or /sci=0/1/9
/gen_doc_show or /gds
/showdiffpgm=xyz.exe"%new%" "%old%" or /sdp=xyz.exe"%new%" "%old%"
/noshowdiffpgm or /nsdp
/keepnversions=n or /kv=n
/backupdir=directory or /bdir=directory
/Skip_commentblock or /scb
/Skip_EndFunc_Comment or /sefc
/Remove_EndFun_comment or /refc
/Skip_EndRegion_Comment or /serc
/remove_endregion_comment or /rerc
/sort_funcs or /sf
/sort_funcs_Comment or /sfc
Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • 2 months later...

I'd like to request another option for empty line: Remove_Empty_Lines=3

This would be equivalent to setting of 2 with the addition there be inserted an empty line after EndFunc lines if there's not one already. I'm thinking of the situation when using Obfuscator to strip includes. The inserted functions are on top of each other like:

Func x()

EndFunc

Func y()

EndFunc

It would be nice to run tidy and get

Func x()

EndFunc

Func y()

EndFunc

I'm thinking of Obfuscator as a way to include source with programs. It's too cumbersome to provide all includes. But if a user wanted reassurance with all the malware paranoia, one could provide the script_Obfuscated.au3 to show what's going in the exe.

Link to comment
Share on other sites

  • Developers

I am not sure what you are after here as you mix Obfuscator output and Tidy. Obfuscator always creates a separate file so why would Tidy need to fix this when you still have the original source?

I'm thinking of Obfuscator as a way to include source with programs. It's too cumbersome to provide all includes. But if a user wanted reassurance with all the malware paranoia, one could provide the script_Obfuscated.au3 to show what's going in the exe.

You mean something like this:

#AutoIt3Wrapper_Res_SaveSource=              ;(Y/N) Save a copy of the Scriptsource in the EXE resources. default=N

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

Including the source in the resource doesn't do much to reassure end user types who aren't going to look in the exe file with a tool. Obfuscator seems the only viable option to present the source as one file. The alternative is to put a note in the readme "download these other 8 includes files from here: url" which is kind of clumsy.

Separating the functions just makes it more readable. It's not a large matter to do it in a few lines myself. Just thought I'd present the idea. Running Tidy as it is indents everything. This option would just unstack the functions.

Edited by MilesAhead
Link to comment
Share on other sites

  • Developers

When you use the Run Obfuscator Directive and the save to resources, you will have a copy of the whole file in both your source directory and Program resources to review.

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

  • 9 years later...
On 10/21/2009 at 1:26 PM, Jos said:

I keep on wondering why I made that helpfile :)

Ctrl+F1 in SciTE: Extra utilities/Tidy

Not to rehash an old thread - but I got here for having the same question.

You need not wonder - absoeffinguseful thing that! (F1 and/or Ctrl-F1)

Having said that ... some suggestions, and a question ...

Until you noted it here, I have not tracked that both F1 and Ctrl+F1 had help, of different areas. (The area separation makes sense.) So, thanks to your post, I now see that tidy documentation.

- (especially) including that the .ini fragment explains (some of) the cryptic parameters list.

So, suggestion: include in the F1 help to press Ctrl-F1 for more info on xyz. e.g. Tidy.

Question (1): Some options are not documented in either, e.g. /ri - have I missed something?

Question(2) : Is there a (Tidy?) link to further documentation? I have (now) seen https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Tidy.html - but seems to miss the same fiddly bits.

Link to comment
Share on other sites

  • Developers
2 hours ago, bs27975 said:

So, suggestion: include in the F1 help

Thanks, but F1 is Autoit3 and Ctrl F1 is a total separate helpfile for SciTE4AutoIt3,  and AutoIt3 doesn't have any real preferences which Editor one uses.

 

2 hours ago, bs27975 said:

Question (1): Some options are not documented in either, e.g. /ri - have I missed something?

Always possible I forgot stuff as the Helpfile is always the last thing that is done, but in this case it is there:

Quote

#Tidy_Parameters=
These settings can be overridden by specifying the below parameters on the Tidy commandline or  #Tidy_Parameters Directive in the script:

/proper or /pr=0/1
-snip
/Region_Indent or /ri

 

 

2 hours ago, bs27975 said:

Question(2) : Is there a (Tidy?) link to further documentation?

This is it, so let me know what is missing and I'll have a look.

In general: I am not overly happy with the INI and the #tidy_Parameter options either, but it all started with just an INI options file and only later the #tidy_directives were introduced. So left the INI option for backward compatibility but would prefer to dich it and continue with only #Directives. 

I would also be happy to publish the Helpfile in Github so people can make Push-Requests for change when that would make things better readable for that single person each month that actually bothers to open the helpfile before asking. :)  

Jos

 

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

Thanks, but F1 is Autoit3 and Ctrl F1 is a total separate helpfile for SciTE4AutoIt3,  and AutoIt3 doesn't have any real preferences which Editor one uses.

You are missing my point.

There are a number of points at which the AutoIt help references SciTE.

All I am suggesting is a pointer to look at the help available there. To the new user, SciTE IS AutoIt, and vice versa. (It takes a bit to realize they are different things - as SciTE is the editor for these AutoIt scripts, to such users, this mistake is understandable.)

I wrote / my point was towards:

>> I keep on wondering why I made that helpfile :)

>> Ctrl+F1 in SciTE: Extra utilities/Tidy

Answer: Because they don't know it's there. F1 does what it does, and there is no ready / obvious indicator that Ctrl-F1 is even there, or useful

- if you want the effort you put into the helpfile to be more fully leveraged, the user needs to be poked towards it so they readily / obviously see the good stuff provided is there, or useful.

 

This is it, so let me know what is missing and I'll have a look.
Let me get back to you on this. I've now chewed through things, but didn't take such notes along the way. I'll be spending some time digging into this (and the 

#AutoIt3Wrapper_... and #Au3Stripper_... and Debug... beasties discovered during that same journey).
 

Link to comment
Share on other sites

  • Developers
1 hour ago, bs27975 said:

You are missing my point.

There are a number of points at which the AutoIt help references SciTE.

I know as we include the lite version of SciTE in its installer, just to get people started.

2 hours ago, bs27975 said:

To the new user, SciTE IS AutoIt, and vice versa

I have seen that confusion but it is not!

It was decided a long time ago that we include this single file SciTE Editor to make Autoit3 much easier for people to get started. But at the same time it was stated that Full SciTE4AutoIt3 installer is not a core part of AutoIt3....

I solely maintain this installer, source and setup scripts for this. I run my own versioning and build scripts for this installer. It is only the SciTE source that is part of the General SVN repository since that is part of the AutoIt3 installer build.  

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

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...