Sign in to follow this  
Followers 0

GUI Input box

8 posts in this topic

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



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.

Share this post


Link to post
Share on other sites

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

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.

Share this post


Link to post
Share on other sites

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

Posted

For future reference, that is not a standard inputbox, it is a gui input control.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)

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

  • Recently Browsing   0 members

    No registered users viewing this page.