Sign in to follow this  
Followers 0

GUI Input box

8 posts in this topic

#1 ·  Posted

Is there a limit to the length of a string stored / retrieved from an input box? I am using a standard input box and I am trying to retrieve a 32 character string, but I am only getting 19 characters. If there is a limit is there anyway to get around it?

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted

From InputBox

The string returned will not exceed 254 characters and if input contains carriage returns or linefeeds, the result will be truncated at the first occurrence of those characters.

Post your code or the relevant part anyway.

- Bruce [font="'Lucida Console';"]/*somdcomputerguy */  If you change the way you look at things, the things you look at change.[/font]

Share this post


Link to post
Share on other sites

#3 ·  Posted

I am using a standard input box with a password '*' filter. My password is 32 characters long but the input box is only 19 characters long. When I try to pass the contents to a variable it will only pass the visible 19 characters. I was able to get it to pass all 32 characters when I extended the size of the input box. I would gather have the input box shorter than the length of the password. Let me know if you know of a solution.

Share this post


Link to post
Share on other sites

#4 ·  Posted

I am using a standard input box with a password '*' filter. My password is 32 characters long but the input box is only 19 characters long. When I try to pass the contents to a variable it will only pass the visible 19 characters. I was able to get it to pass all 32 characters when I extended the size of the input box. I would gather have the input box shorter than the length of the password. Let me know if you know of a solution.

That isn't posting relevent code.

You don't seem to realize there are several reasons we might want to see the code beside the obvious one, I want to steal your ever so secretive code because... , well, just because.

Personally I could care less about your code (I have some thanks), but at least post a snippet that demonstrates the problem and make sure the input is created exactly as you have it in your script.


GeorgeQuestion 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!"

Share this post


Link to post
Share on other sites

#5 ·  Posted

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

GuiCreate("Input",247,224,441,368)
$input1 = GuiCtrlCreateInput("",10,10,100,20,$ES_PASSWORD)
$msgbox = GUICtrlCreateButton("Input",10,30,60,20)
GUICtrlSetData($input1,"12345678901234567890123456789012")
GuiSetState()

While 1
$msg = GuiGetMsg()
If $msg = -3 Then Exit
    If $msg = $msgbox Then MsgBox(0,'',StringLen(guictrlread($input1)))
Wend

if you manually type in a new password it will only do 13 characters.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

GuiCreate("Input",247,224,441,368)
$input1 = GuiCtrlCreateInput("",10,10,100,20,BitOR($ES_AUTOHSCROLL,$ES_PASSWORD))
$msgbox = GUICtrlCreateButton("Input",10,30,60,20)
GuiSetState()

While 1
    Sleep(10)
$msg = GuiGetMsg()
If $msg = -3 Then Exit
    If $msg = $msgbox Then MsgBox(0,'',guictrlread($input1) & @CRLF)
Wend

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#8 ·  Posted

As predicted, it's a style problem. Either use what JohnOne posted for the style or use BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)


GeorgeQuestion 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!"

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  
Followers 0