Jump to content
Sign in to follow this  
cyberbit

Text becomes invisible in Input

Recommended Posts

cyberbit

Hi, I've noticed when putting large amounts of text (i.e., >5540 chars) into an Input control, the text becomes invisible. Is this a limit issue? My debugging says it is not; I can get full 32-bit-sized strings out of it and into it. It's just annoying when it keeps disappearing. :D

Here's my <uber simplified> GUI code:

$gui = GUICreate("Test GUI", 250, 50)
$msglbl = GUICtrlCreateLabel("Type message below:", 5, 5)
$msgbox = GUICtrlCreateInput(ClipGet(), 5, 20, 240)
GUISetState()
While 1
WEnd

Regards,

Cyberbit

Edited by cyberbit

_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

[hr]

50% of the time, it works all the time. -PezoFaSho

Share this post


Link to post
Share on other sites
BrewManNH

I just ran your code with 6463 characters in the clipboard, and the input control didn't "disappear" for me.


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

Share this post


Link to post
Share on other sites
cyberbit

I just ran your code with 6463 characters in the clipboard, and the input control didn't "disappear" for me.

I don't mean the entire control disappears, but the text becomes unreadable. For example, copy all the text in my attachment, then open my script above. There's about 42k characters in it, so that *should* make it work (or not work, as I want to fix this XD). If it still doesn't it's probably a problem on my end. :doh:

big data.txt

Edited by cyberbit

_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

[hr]

50% of the time, it works all the time. -PezoFaSho

Share this post


Link to post
Share on other sites
water

I tested your script with the 42k characters and I get the same problem. The control is empty.

Seems to be an input limit. Is somewhere between 8000 and 9000 characters (8000 work, 9000 doesn't)

Edit: The limit is 8757

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
cyberbit

The control is empty. Seems to be an input limit.

Not true. In my original script I can extract the full string of 42k characters with GUICtrlRead. I've already tried setting the limit to 232-1 (the suggested maximum for Edit controls; 2,147,483,647) with no effect:

GUICtrlSetLimit($msgbox, 2147483647)

I think it's something like a display limit. But I don't see how that could be fixed, as it seems to vary from system to system. For me it cuts off at about 5.4k, for you, water, around 8.7k.

Even weirder, try typing a non-printable char in the Input (i.e. Ctrl+Backspace). It displays a visible generic glyph, but the rest of the chars remain invisible. :huh2:


_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

[hr]

50% of the time, it works all the time. -PezoFaSho

Share this post


Link to post
Share on other sites
BrewManNH

Why are you pasting that much information into an input control anyways? Wouldn't an edit control be a more logical control to use for something like this?


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

Share this post


Link to post
Share on other sites
cyberbit

Valid point, but for my usage I do not a heavy-duty control like Edit.

Basically I'm using the Input control as a paste bin for an encoded String, so the user doesn't need to view it, but needs something to put the String in. A larger read-only Edit control is used for the decoded message. I've attached a screenshot if that doesn't make sense. ;)

post-75443-0-75040400-1350326902_thumb.p

Regards,

Cyberbit


_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

[hr]

50% of the time, it works all the time. -PezoFaSho

Share this post


Link to post
Share on other sites
BrewManNH

If it's in the Clipboard, and the user doesn't need to see it, then you don't need the input control at all, just decode directly from clipboard. Or, you could change the input control to an edit control, and just limit its height so that it's still the same dimensions of your input control.


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

Share this post


Link to post
Share on other sites
cyberbit

If it's in the Clipboard, and the user doesn't need to see it, then you don't need the input control at all, just decode directly from clipboard. Or, you could change the input control to an edit control, and just limit its height so that it's still the same dimensions of your input control.

Interesting. I'll experiment. ^_^

Regards,

Cyberbit


_ArrayConcatenate2D · Aero Flip 3D · EPOCH (destroy timestamps) · File Properties Modifier · _GetFileType · UpdateEngine<new> · In-line Case (_ICase) <new>

[hr]

50% of the time, it works all the time. -PezoFaSho

Share this post


Link to post
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
Sign in to follow this  

×