Jump to content

login...


Recommended Posts

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 by dufran3
Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

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 GUI

For excample..

User: ash

Pass:boo

1 GUI

User: boo

Pass: ash

A 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...

Link to comment
Share on other sites

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

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 password

thanks for your help anyways,,,

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...