Jump to content

Tidy 4096 char limit


Recommended Posts

Tidy has a limitation of 4096 chars and I have an array, spanning multiple lines (see below), that exceeds this and so I get a

### Tidy Error: Concatenated Script line longer than 4095.

error. As a result, Tidy is unable to complete. I've not found a Tidy option where this could be raised.

Currently I have externalised the array declaration inside a separate .au3 file so that the remaining code can be tidied.

Is there any possibility that you could add this as an option to Tidy for future releases ?

Sorry I'm not sure this is the right location for posting this, but at least this is a section I'm allowed to create a new topic (I'm a new member)

The declaration is as follows. So in fact each line is not more than 4096 char, but the whole array is of course.

(As I'm writing this, another possibility to solve the problem would be that Tidy is taking the '_' char into consideration and would do a line by line tidy instead of a "global" tidy of the whole array)

Local $arrayLettersData[52][25] = _

[[0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1], _

[1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1], _

[0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, -1, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, 0, 1], _

[0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1], _

...

]

Link to comment
Share on other sites

One way around this is to create temporary arrays that hold the values and keeping the character count under 4096, and then merging them together later in the script.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Odd ... Tidy on this side is not even giving a peep when running it on a file THAT contains a code-text-line* that's longer than 4096 characters. ... Perhaps a update might be in order on your side

*Code on a single (none multiple split) line

"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

I'm running this, isn't it the latest version ?

Tidy AutoIt3 v2.1.0.0 Copyright © Jos van der Zande December 28, 2009

Odd ... Tidy on this side is not even giving a peep when running it on a file THAT contains a code-text-line* that's longer than 4096 characters. ... Perhaps a update might be in order on your side

*Code on a single (none multiple split) line

Link to comment
Share on other sites

I also tried to remove the multiple split line and put it on one line. The error is somewhat different but it still stops:

Tidy AutoIt3 v2.1.0.0 Copyright © Jos van der Zande December 28, 2009

!> File contains records longer than 4095 characters .. stopping process.

I'm running this, isn't it the latest version ?

Tidy AutoIt3 v2.1.0.0 Copyright © Jos van der Zande December 28, 2009

Link to comment
Share on other sites

I'm showing a version number of 2.2.0.12 but that might be a Beta version. The one I used before that was the same as you have.

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

Check post, there's a new Tidy beta out that removes that limitation on character length of a line.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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