brdude Posted February 11, 2006 Share Posted February 11, 2006 Hi guys I'm new to auto-it and i've been making a script in gui but i have been loking through the forum to see if i found an answer to my question and got nothing (24hr no sleep) . Here is my problem i want to creat and input box and limit the # of characters that can be entered and i was wondering if there is a way to script it on auto-it such that when the user is typing and reaches a certain amount of characecters he wont be able to input any thing else to that box. Is there a way to do this or would I have to code it so that when he subimits the form I will have to check the string length and return to the form giving him and error message. Link to comment Share on other sites More sharing options...
Valuater Posted February 11, 2006 Share Posted February 11, 2006 1 Welcome to the AutoIt Forums2AYes, GuictrlsetLimit() for a gui ( like you said at the first part of your postByou cant test the length after an InputBox withStringLen()You can find both of these in help3 to get everything you need and learn alot fast see thisWelcome to AutoIt 1-2-3http://www.autoitscript.com/forum/index.php?showtopic=21048#good luck8) Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 11, 2006 Share Posted February 11, 2006 You can use the following to set the maximum number of characters in an input box. Please note that the current limit is 10. You can change the limit by changing the last 10 to some other number. Hope this is what you are looking for: InputBox ( "Inputbox", "Please enter something, you can only enter a maximum of 10 characters:" , "", " " & 10) The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
brdude Posted February 11, 2006 Author Share Posted February 11, 2006 Thanks guys i'm going to try these out rigth now and thanks for the guide Valuater..... Link to comment Share on other sites More sharing options...
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