ashley Posted July 11, 2007 Share Posted July 11, 2007 is it possible... to make a gui with 2 input boxes... Where people can put a username and password... The username and password would be somewere else so when compiles it works as well... any idears Free icons for your programs Link to comment Share on other sites More sharing options...
dufran3 Posted July 11, 2007 Share Posted July 11, 2007 (edited) ummm...yeh...sounds doable. Here is something to start with that may help you out. #Include <GUiConstants.au3> ;Create GUI $Main = GUICreate('Collect Username and Password', 300, 100) Opt("GUICoordMode",1) $username = GUICtrlCreateInput('',100,20,100) $usernamelabel = GUICtrlCreateLabel('Username',30,23) $password = GUICtrlCreateInput('',100,45,100,0,$ES_PASSWORD) $passwordlabel = GUICtrlCreateLabel('Password',30,48) $Button_1 = GUICtrlCreateButton ("OK", 190, 70, 0, 0, 0x0001) $Button_2 = GUICtrlCreateButton ("Exit", 245, 70, 0, 0) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_1 GLOBAL $collectusername = GUICtrlRead($username) WinSetState('Collect Username and Password','',@SW_HIDE) GLOBAL $collectpassword = GUICtrlRead($password) MsgBox(0,'Username and Password','Username: ' & $collectusername & @CRLF & 'Password: ' & $collectpassword) ExitLoop Case $msg = $Button_2 Exit EndSelect Wend Edited July 11, 2007 by dufran3 Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 ummm...yeh...sounds doableany ideas how... Free icons for your programs Link to comment Share on other sites More sharing options...
powaking Posted July 11, 2007 Share Posted July 11, 2007 I have my tool just prompt for their logged on password. Using their logged on ID and their password I verify the password against AD. If that comes back ok I then verify that they are part of a Global Group in AD. If that comes back ok then they can use the tool. Otherwise they get a response that either the password was incorrect or they are not authorized to use the tool. This way I don't have to administer a password list or a list of users that are permitted. If you are part of our group and you are in the global group in AD then you are good to go to use the tool. Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 ok what does all that meen... Free icons for your programs Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 ummm...yeh...sounds doable. Here is something to start with that may help you out. #Include <GUiConstants.au3> ;Create GUI $Main = GUICreate('Collect Username and Password', 300, 100) Opt("GUICoordMode",1) $username = GUICtrlCreateInput('',100,20,100) $usernamelabel = GUICtrlCreateLabel('Username',30,23) $password = GUICtrlCreateInput('',100,45,100,0,$ES_PASSWORD) $passwordlabel = GUICtrlCreateLabel('Password',30,48) $Button_1 = GUICtrlCreateButton ("OK", 190, 70, 0, 0, 0x0001) $Button_2 = GUICtrlCreateButton ("Exit", 245, 70, 0, 0) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button_1 GLOBAL $collectusername = GUICtrlRead($username) WinSetState('Collect Username and Password','',@SW_HIDE) GLOBAL $collectpassword = GUICtrlRead($password) MsgBox(0,'Username and Password','Username: ' & $collectusername & @CRLF & 'Password: ' & $collectpassword) ExitLoop Case $msg = $Button_2 Exit EndSelect Wend urm.. yea... i want the first bit.. but not the second... can you make it so it will caome up with incorect passsword.. if its incorect... and if correct will go to then next gui Free icons for your programs Link to comment Share on other sites More sharing options...
powaking Posted July 11, 2007 Share Posted July 11, 2007 My tool is used in a Domain environment where people login to domains. my tool takes advantage of this environment so that I don't have to keep track of passwords and such. As long as the user is part of a specific global group in the Active Directory then they are allowed to use it. Should they move to another organization they would be removed from this group and would no longer be able to use this tool. Otherwise if I was to provide a hard coded password in the tool then who knows how far it would go. Is your tool going to be used by a specific group of people? in a Domain environment? Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 My tool is used in a Domain environment where people login to domains. my tool takes advantage of this environment so that I don't have to keep track of passwords and such. As long as the user is part of a specific global group in the Active Directory then they are allowed to use it. Should they move to another organization they would be removed from this group and would no longer be able to use this tool. Otherwise if I was to provide a hard coded password in the tool then who knows how far it would go.Is your tool going to be used by a specific group of people? in a Domain environment?it will be a login Username and password.. to a GUIFor excample..User: ashPass:boo1 GUIUser: booPass: ashA diffrent GUI...The guis will be how they want... inolther word... a safe...and i could do with it checking form a ini file...which is hiden in a file in programs... Free icons for your programs Link to comment Share on other sites More sharing options...
dufran3 Posted July 11, 2007 Share Posted July 11, 2007 I am not going to write your GUI for you. All i did was show you basic concept of how to create a GUI and input controls. I'm sorry but I don't have the time to modify this for you. Check the documentation and mold what I gave you to fit your needs. Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 I am not going to write your GUI for you. All i did was show you basic concept of how to create a GUI and input controls. I'm sorry but I don't have the time to modify this for you. Check the documentation and mold what I gave you to fit your needs.just tell me how to make it check for the passwordthanks for your help anyways,,, Free icons for your programs Link to comment Share on other sites More sharing options...
dufran3 Posted July 11, 2007 Share Posted July 11, 2007 Check for the password. What is it supposed to be checking against? The windows login? AD? Link to comment Share on other sites More sharing options...
ashley Posted July 11, 2007 Author Share Posted July 11, 2007 Check for the password. What is it supposed to be checking against? The windows login? AD?the password that they set.... Free icons for your programs Link to comment Share on other sites More sharing options...
dufran3 Posted July 11, 2007 Share Posted July 11, 2007 ummm...The password that they set? are they creating a password? I have no idea what you are talking about. I can't be much help without more information. Link to comment Share on other sites More sharing options...
Gif Posted July 11, 2007 Share Posted July 11, 2007 i am not too sure if i understood you but if you want to check the password of a user try RunAsSet() and use the password option.. 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