Sign in to follow this  
Followers 0
Raymond

About "password char" of InputBox function

6 posts in this topic

Help doesn't say too much:

"[optional]The character to replace all typed characters with. If you want the actual typed character to appear, define with an empty string ("") (default) or a space for the first character. If you provide a multiple-char string, only the first char is used for character masking. There are special meanings for the second and subsequent characters. See Remarks."

"The second and subsequent characters of the password field can be used to restrict input. Use a space to fill the first character to still see the characters typed. Putting an M after the first character indicates that input is Mandatory; i.e. you must enter something. Nothing will happen if you press the Ok button when there is nothing in the InputBox. It will not close and return the string."

Now I know what space and M mean. But that's all?

I want to have more control on input format, where can I find full explanation/format of "password char"?

Share this post


Link to post
Share on other sites



the example at the bottom of the help file is great

;Places the input box in the top left corner displaying the  characters as they 
;are typed.
$answer = [color="#ffffff"]InputBox[/color]("Question", "Where were you born?",  "Planet Earth", "",  _
    -1,  -1, 0, 0)

;Asks the user to enter a password.   Don't forget to validate it!
$passwd = [color="#ffffff"]InputBox[/color]("Security Check",  "Enter your password.", "",  "*")

;Asks the user to enter a 1 or 2 character response.  The M in the  password 
;field indicates that blank string are not  accepted and the 2 indicates that the 
;responce will  be at most 2 characters long.
$value = [color="#ffffff"]InputBox[/color]("Testing", "Enter the 1 or 2 character code.", "",  " M2")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

@Valuater

I already read that. So there're several circumstances:

"" (default)

" " (I don't tell the difference from "")

" M" (must input something)

" M4" (must input no more than 4 char)

"*" (hide the password)

Anything else?

For example, I want to control input as time format "mm:ss", can I do that?

Share this post


Link to post
Share on other sites

For example, I want to control input as time format "mm:ss", can I do that?

Have you looked at the StringFormat() functions?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

i think i have seen a "timed-out" placed on an input box... but never a time to be placed in it ( like you want )

sorry

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Have you looked at the StringFormat() functions?

I tried. But "format control" of StringFormat() function cannot apply to "password char" of InputBox function, right? Or maybe I miss anything?

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