Emiel Wieldraaijer Posted October 28, 2007 Share Posted October 28, 2007 Hi All, is it possible to toggle $ES_PASSWORD on/off i couldn't find anything about it Thnx Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
ChrisL Posted October 28, 2007 Share Posted October 28, 2007 I'm not sure you can I tried setting the style with GuiCtrlSetStyle() and it didn't work but the help file says some styles can not be changed once set. The other way you could do it is to delete the control and recreate it. #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 170,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Input_1 = GuiCtrlCreateInput("", 10, 20, 320, 30) $Button_2 = GuiCtrlCreateButton("Password", 20, 120, 140, 30) $Button_3 = GuiCtrlCreateButton("Plain", 220, 120, 140, 30) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 GuiCtrlDelete($Input_1) $Input_1 = GuiCtrlCreateInput("", 10, 20, 320, 30,$ES_PASSWORD) Case $msg = $Button_3 GuiCtrlDelete($Input_1) $Input_1 = GuiCtrlCreateInput("", 10, 20, 320, 30) Case Else ;;; EndSelect Wend [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 28, 2007 Moderators Share Posted October 28, 2007 (edited) I would imagine that EM_SETPASSWORDCHAR + SendMessage + ControlFocus after the call would change it.Edit:Guess this is a good reason why I "Imagined" it:http://www.autoitscript.com/forum/index.ph...SETPASSWORDCHAR Edited October 28, 2007 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted October 28, 2007 Author Share Posted October 28, 2007 @SmOke_N thnx for pointing me into the right direction Show Password GUICtrlSendMsg($PasswordField,0xCC,0,0) GUICtrlSetState($PasswordField, @SW_UNLOCK) Hide Password GUICtrlSendMsg($PasswordField, 0xCC, Asc("*"), 0) GUICtrlSetState($PasswordField, @SW_UNLOCK) Should do the trick @ChrisL i believe deleting an recreating the field will also do the trick .. i haven't tried .. thnx anyway Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
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