Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

GUI Input box


  • Please log in to reply
7 replies to this topic

#1 grasshopper3

grasshopper3

    Adventurer

  • Active Members
  • PipPip
  • 101 posts

Posted 14 May 2010 - 01:00 AM

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







#2 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,864 posts

Posted 14 May 2010 - 01:23 AM

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 /*somdcomputerguy */  If you change the way you look at things, the things you look at change.


#3 grasshopper3

grasshopper3

    Adventurer

  • Active Members
  • PipPip
  • 101 posts

Posted 17 May 2010 - 01:23 PM

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.

#4 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 17 May 2010 - 01:51 PM

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

#5 grasshopper3

grasshopper3

    Adventurer

  • Active Members
  • PipPip
  • 101 posts

Posted 17 May 2010 - 02:47 PM

#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.

#6 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 12,988 posts

Posted 17 May 2010 - 02:58 PM

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

AutoIt Absolute Beginners Require a serial
 
 
OMG! Women are the cows of people.


#7 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 12,988 posts

Posted 17 May 2010 - 03:10 PM

#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, 17 May 2010 - 03:12 PM.

AutoIt Absolute Beginners Require a serial
 
 
OMG! Women are the cows of people.


#8 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 17 May 2010 - 03:29 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users