Sign in to follow this  
Followers 0
de1m

Password input console

5 posts in this topic

Hi,

i've wrote a console applicaton and I need to input a password with "*" chars. I found >this topic, but I don't understand how can I change the function "Cin" to input a password.
Can someone help me please?!

Regards,

alex

Share this post


Link to post
Share on other sites



You can set the style of GuiCtrlCreateInput to $ES_PASSWORD

Share this post


Link to post
Share on other sites

but this is a GUI Input and I need a console(in Windows CMD) input.

Share this post


Link to post
Share on other sites

Maybe this.

; Asks the user to enter a maximum 4 character password.
Local $sPasswd = InputBox("Security Check", "Enter your password.", "", "*M4")

; Display the result.
MsgBox(0, "Results", $sPasswd)

See "InputBox" function in help file for more examples.

Share this post


Link to post
Share on other sites

thank for help. I've solved my problem. 
I use now this UDF

I can disable input in console with this code:

_Console_SetMode(-1, BitNOT($ENABLE_ECHO_INPUT))

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