Share this post

Link to post

Share on other sites

Melba23 2,661

Melba23 2,661

You always should fix the first error shown and then rerun the utility - the first error often causes Tidy to see non-existent errors in the subsequent code which usually vanish once you fix the first one, as is the case here once you remove the EndSelect.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

BodoWitcha 0

BodoWitcha 0

I fully agree. But tidy tells the first error msg is on line 9, while that error message is on line 8. The first issue is, as you said earlier, which must be fixed (in this case on line 6 the extra Else).

The sample was created to create tidy errors to report the issue. Fixing the code is not the issue, but referring to the wrong line is.

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post

Link to post

Share on other sites

Jos 1,303

Jos 1,303

I fully agree. But tidy tells the first error msg is on line 9, while that error message is on line 8. The first issue is, as you said earlier, which must be fixed (in this case on line 6 the extra Else).

The sample was created to create tidy errors to report the issue. Fixing the code is not the issue, but referring to the wrong line is.

I will check to see if at least the first error points to the correct line number.

Can Tidy change notyfication behavior to notyfi by CallTips (like Au3Check) instead using comments ?It should also fix the problem which find OP.

CallTips? Tidy has the same behaviour already as au3check with the console message generated in the SciTE Outputpane.The line insertion was at the time the error's in the SciTE outputpane were not used at all yet.I've later added the Console output messages but never removed the line insert as they were not bothering me and actually helped finding the records in error.

Share this post

Link to post

Share on other sites

Melba23 2,661

Melba23 2,661

I like the way the new version indicates the errors within the script - any chance that you could make these messages appear automatically rather than only after double-clicking one of the console lines? Perhaps as an option?

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

mLipok 666

mLipok 666

I like the way the new version indicates the errors within the script - any chance that you could make these messages appear automatically rather than only after double-clicking one of the console lines? Perhaps as an option?

M23

I also like the new inline messages in TIDY (I was called them CallTip in post #7)@Melba23 I notice that the same Feature Request could be for Au3Check, as now inline messages for Au3check not appear automatically.I would also please to make option for inline messages in Au3Check and Tidy as default Enabled (EDIT: So as to preserve compatibility with the previous version.)

Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post

Link to post

Share on other sites

nitekram 68

nitekram 68

Since you will be in there...is there any way you can fix the issue where tidy does not clean up after itself. Take a UDF file and make an error in it. Then compile your main script, it will take you to the error, but after fixing it, try and run tidy - I have found that more times than not, the tidy code does not get removed, and I have go to the line above the error and hit delete, taking the error line away, then hit return, to get everything back to tidy.

2¢

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go."

"Everybody catches up with everyone, eventually"

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

Ternary operator

Share this post

Link to post

Share on other sites

guinness 1,450

guinness 1,450

You mean you fix the error in the UDF and then go back to your main script to "tidy" that? Or that you fix the error in the UDF and tidy the UDF there and then. If it's the first one then it's not a bug, as Tidy only formats the script that has focus.

Share this post

Link to post

Share on other sites

nitekram 68

nitekram 68

It might be, as there are sometimes issues with the comments making the whole script show below the comment (talking about #CS $ CE#) look like it is a comment, meaning no pretty colors, all green. I then have to run Tidy to get it to remove all the green.

2¢

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go."

"Everybody catches up with everyone, eventually"

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

Ternary operator

Share this post

Link to post

Share on other sites

Jos 1,303

Jos 1,303

Tidy is ran by itself and doesn't trigger any clearing of the inline errors in SciTE. This only happens when you do the next au3check as that uses autoit3wrapper which send the SCI_ANNOTATIONCLEARALL each run. Can see to have Tidy also send that command to the SciTE director interface, but this would be something new.