Sign in to follow this  
Followers 0
xShadowx

password+confirm password box?

11 posts in this topic

Sorry if this is in the wrong spot. I am wondering, im making an autoit script and I need to make a password box, then a confirm password box below it. and if the passwords dont match there will be alittle popup or a red "X" to one side. Is that possable to do, or no?

Share this post


Link to post
Share on other sites



Sorry if this is in the wrong spot. I am wondering, im making an autoit script and I need to make a password box, then a confirm password box below it. and if the passwords dont match there will be alittle popup or a red "X" to one side. Is that possable to do, or no?

yes its absolutely possible.

when the button is pressed, GuiCtrlRead both input boxes.

and when you create the input boxes, assign them to variables.

so lets say your input boxes are $InputBox1 and $InputBox2

when they press the button, you could be like

If GuiCtrlRead($InputBox1) <> GuiCtrlRead($InputBox2) ThenMsgBox(0, "", these don't match")

Share this post


Link to post
Share on other sites

Could you give me an example, im kind of new to this?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Yes it is.

ex;

I used a button instead of a image :)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 229, 177, 193, 115)
$Input1 = GUICtrlCreateInput("Input1", 48, 40, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 48, 112, 121, 21)
$check = GUICtrlCreateButton("Button2", 72, 144, 75, 25, 0)
GUISetState(@SW_SHOW)
Global $popup

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $check
            If GUICtrlRead($Input1) = GUICtrlRead($Input2) Then
                GUICtrlDelete($popup)
                MsgBox(0, "Pass", "passwords matched!")
            Else
                $popup = GUICtrlCreateButton("", 176, 115, 11, 17, 0)
                GUICtrlSetBkColor(-1, 0xFF0000)
            EndIf
    EndSwitch
WEnd
Edited by Zisly

Share this post


Link to post
Share on other sites

Thankyou very much. Much appreciated.

Share this post


Link to post
Share on other sites

No problem! :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Ok, what if im using a send command? Like:

send("pass""{enter}")

How would I add the word typed into the password box, to where the password is in the send command? If that makes sense?

Edited by xShadowx

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Hum, if I got it right :)

[code

guictrlsetdata($input2,guictrlread($input1))

Edited by Zisly

Share this post


Link to post
Share on other sites

Could you implement that too. :)

Sorry im asking so much.

Share this post


Link to post
Share on other sites

Sounds like you don't want to do any of the "work"...

You fix it! :)

Share this post


Link to post
Share on other sites

Ok, sorry. I will try.

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