Source language: Translate to:

HELP! - Bizarre Text Box or String Limitations

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

HELP! - Bizarre Text Box or String Limitations

Postby Enigman » Wed Mar 07, 2012 6:55 pm

This is going to be a bit weird to explain, but bear with me.

I have an app that generates encrypted text output. The output is visible characters, although coded. The characters are generated and continuously added to the end of a string variable using something like

Code: Select all
SetVar "[CryptText]" "![CryptText][NewString]"

[CryptText] is associated with a multi-line text box.

If the input is smaller, where the output is less than 60000 characters, everything works fine and the box contains what is expected.

If the input is larger, everything works fine until it gets to the point that the amount of text being manipulated with the SetVar command shown above reaches 60000 characters. At that point, the text box only shows the first 60000 characters on screen and stops updating. Running StrLen against [CryptText] shows that the variable is still growing, but the text box remains static at 60000. The program runs to a normal completion.

When the program finishes, the final output could be 93737 characters or anything higher than 60000. I can do a FileWrite from [CryptText] to a file and all 93737 characters end up in the file.

HOWEVER, if I do a FileRead and bring back the 93737 and put it in [CryptText] the StrLen count says [CryptText] is 93737 long, but only 60000 are available in the text box.

Bizarrely, if I set my cursor in the text box and start typing, I can add as many characters as I want. Likewise, if I copy some text from the box and then paste the text in again and again I can push the visible and editable character count way over 60000.

But no matter what, if I fill the text box by any programmatic method involving SetVar or StrIns or FileRead, then the text in the box is capped at 60000, even though the [CryptText] variable can be queried with StrLen and report 93737 characters in the variable.

If I change the box content manually, then the on screen character count matches the measured character count in the [CryptText] variable.

Does anyone know WHAT kind of limitation I have hit here?
User avatar
Posts: 316
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Postby HPW » Wed Mar 07, 2012 11:26 pm

The help-file is wrong here:
You can limit how much text the reader may enter by typing a number into the Limit input to box. Specify 0 (zero) to allow the maximum number of characters to be entered.

When nothing entered it is a 60000 limit

Type in for example 1000000 and you get them.
User avatar
Posts: 2532
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Enigman » Thu Mar 08, 2012 12:08 am

OMG! You're a LIFE saver. :lol:

I just set the limit to 10 Megabytes (10485760) and it works, at least with inputs I have tried, but it's way past the 60000.

Thank you sooo much.
User avatar
Posts: 316
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest