TheAutomator Posted November 28, 2014 Posted November 28, 2014 (edited) Hi, simple question actually: How to disable the character limit for an edit control? Want unlimited-length (or as much as possible) I know the GUICtrlSetLimit() function but i want to disable the limit, not set one... Any ideas? I thought there was some sort of autoit constant for this or something but cant find what i'm looking for. Edited November 28, 2014 by TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
iamtheky Posted November 28, 2014 Posted November 28, 2014 (edited) There are always limits. https://www.autoitscript.com/autoit3/docs/appendix/LimitsDefaults.htm and this may help https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetLimit.htm i think the max parameter may set it to max by default, eventhough that is not described, may be stretching but i think it is an implementation of this: http://msdn.microsoft.com/en-us/library/95zx4bc4.aspx Edited November 28, 2014 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
TheAutomator Posted November 28, 2014 Author Posted November 28, 2014 (edited) There are always limits. https://www.autoitscript.com/autoit3/docs/appendix/LimitsDefaults.htm and this may help https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetLimit.htm i think the max parameter may set it to max by default, eventhough that is not described, may be stretching but i think it is an implementation of this: http://msdn.microsoft.com/en-us/library/95zx4bc4.aspx Hello boththose , I came across the first two links you provided but I thought there was a constand or such in autoit to set it to the max limit.. If you take a look at notepad.exe for example, what would be the limit there? Or code editors? A long time ago I saw a topic where someone omitted the character limit and I used it back then for making my own text editor but I can't find it anymore. Anyways, thanks for the reply. [EDIT:] I think it was $EM_EXLIMITTEXT or something, could that be? I have to search which include has that constant if i'm right.. [EDIT:] Nope, didn't work.. TheAutomator Edited November 28, 2014 by TheAutomator Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
Solution TheAutomator Posted November 28, 2014 Author Solution Posted November 28, 2014 Found! GUICtrlSendMsg($iEdit, $EM_LIMITTEXT, -1, 0) ; Removes the limit on the number of characters of the 30000 Regards! Acanis, ss26 and mike2003 2 1 Retro Console, NestedArrayDisplay UDF foldermaker-pro-clone MiniMark Editor
iamtheky Posted November 28, 2014 Posted November 28, 2014 (edited) If you take a look at notepad.exe for example, what would be the limit there? i have to use VIM when it starts reaching the limits of my memory, but thats a whole seperate app. For an edit control, your limit would still be the string size limit, unless you can chunk data back out of the control. Good find, here it is wrapped for rich edit boxes. I thought rich edit boxes had 64k but the helpfile states that this is used to exceed the 32k barrier (which was my search)... https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlRichEdit_SetLimitOnText.htm Edited November 28, 2014 by boththose TheAutomator 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now