epicfail Posted September 23, 2009 Posted September 23, 2009 ok i know how to hide the letters typed into the input with $ES_PASSWORD but how would i have the input say (Enter Password) then when i click it it deletes that and then i type my password and it hides it with password dots But if i dont type anything and click out of the password input box it will come up with (Enter Password)
jvanegmond Posted September 23, 2009 Posted September 23, 2009 You can use two input boxes, one with $ES_PASSWORD defined and the other without. You then hide and show them based on what you need. github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 but when u click on the 1 that shows (EnterPasswor) wont it just stay in that and u will still be typing in it?
jvanegmond Posted September 23, 2009 Posted September 23, 2009 On click: - Hide the box that the user just clicked (Enter password.. box) - Show the box where the user should enter real password - Put focus on the real password box : ) And when it loses focus and has no text in it, you reverse the process. github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 so something like this? but its not working #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Password Dialog", 251, 96, -1, -1) $Input1 = GUICtrlCreateInput("Enter Password", 8, 32, 233, 21) $PasswordEdit = GUICtrlCreateInput("password", 8, 32, 233, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) GUICtrlSetState($PasswordEdit, $GUI_HIDE) $ButtonOk = GUICtrlCreateButton("&OK", 86, 64, 75, 25, 0) $ButtonCancel = GUICtrlCreateButton("&Cancel", 167, 64, 75, 25, 0) $EnterPassLabel = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Input1 GUICtrlSetState($Input1, $GUI_HIDE) GUICtrlSetState($PasswordEdit, $GUI_SHOW) EndSwitch WEnd
jvanegmond Posted September 23, 2009 Posted September 23, 2009 It doesn't go into "Case $Input1", because $Input1 is only "fired" when you press enter inside the box. You need to do it on click. github.com/jvanegmond
jvanegmond Posted September 23, 2009 Posted September 23, 2009 You check in every loop with ControlGetFocus to see if the "Enter password.." input box is checked. This information is available on the forums, found it with a Google search that took 5 seconds. github.com/jvanegmond
jvanegmond Posted September 23, 2009 Posted September 23, 2009 I understand why if you post back after only two minutes. lol. github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 well i looked 4 it and couldnt find it and i was looking before i made this topic i couldnt find anything that dose this with passwords
jvanegmond Posted September 23, 2009 Posted September 23, 2009 Ok. Is there anything else I can help you with? github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 yeah would u please give me the link to show me how to do this?
jvanegmond Posted September 23, 2009 Posted September 23, 2009 (edited) Ofcourse. Here it is: http://www.autoitscript.com/forum/index.php?showtopic=95151 . I searched for: site:autoitscript.com GUICtrlCreateInput on click Edited September 23, 2009 by Manadar github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 that dont really do what i need that dose something on enter.
jvanegmond Posted September 23, 2009 Posted September 23, 2009 No, don't you reminder my original solution? It should be on click. When you click an input box, it gets focus, what do you to check focus? Right, ControlGetFocus. I'm going to hate myself for giving you this but I don't want to go through another 20 page discussion. Why did I even reply to this topic? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Password Dialog", 251, 96, -1, -1) $Input1 = GUICtrlCreateInput("Enter Password", 8, 32, 233, 21) $PasswordEdit = GUICtrlCreateInput("", 8, 32, 233, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) GUICtrlSetState($PasswordEdit, $GUI_HIDE) GUICtrlSetState($PasswordEdit, $GUI_FOCUS) $ButtonOk = GUICtrlCreateButton("&OK", 86, 64, 75, 25, 0) $ButtonCancel = GUICtrlCreateButton("&Cancel", 167, 64, 75, 25, 0) $EnterPassLabel = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Input1 GUICtrlSetState($Input1, $GUI_HIDE) GUICtrlSetState($PasswordEdit, $GUI_SHOW) EndSwitch If ControlGetFocus($Form2) == "Edit1" Then GUICtrlSetState($Input1, $GUI_HIDE) GUICtrlSetState($PasswordEdit, $GUI_SHOW) GUICtrlSetState($PasswordEdit, $GUI_FOCUS) EndIf WEnd github.com/jvanegmond
jvanegmond Posted September 23, 2009 Posted September 23, 2009 I'm facepalming myself right now. github.com/jvanegmond
epicfail Posted September 23, 2009 Author Posted September 23, 2009 haha it wasnt that bad helping me out was it
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now