Jump to content

Recommended Posts

Posted

Hello everyone.

How can I create a single input box but with multiple entry and a single submit button?

I want this multiple entry input box only appear everytime I trigger a hotkey.

 

Thank you

Posted
7 hours ago, HezzelQuartz said:

How can I create a single input box but with multiple entry and a single submit button?

As @Andreik already wrote, it has to be an entire GUI.

Here a quick example for an user interface :

#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 6 -w 7
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <ColorConstantS.au3>
#include <FontConstants.au3>
#include <EditConstants.au3>
#include <MsgBoxConstants.au3>

; -------------------------------------------------------------------------------------------------------------------------------
; GUI (Modus = messageloop)
; -------------------------------------------------------------------------------------------------------------------------------
Global $hGUI, $iGuiMsg
Global $idInpFullname, $idInpEmail, $idInpTelephone, $idInpUsername, $idInpPassword, $idInpPasswordCheck
Global $idBtnRegister, $idBtnCancel

GUICreate(" - ", 500, 600, -1, -1)
GUISetFont(11, $FW_NORMAL, 1, "Arial")

GUICtrlCreateLabel("Your full name",     20,  20, 400, 30)
GUICtrlCreateLabel("Your email",         20, 100, 400, 30)
GUICtrlCreateLabel("Your telephone",     20, 180, 400, 30)
GUICtrlCreateLabel("Choose an username", 20, 260, 400, 30)
GUICtrlCreateLabel("Choose a password",  20, 340, 400, 30)
GUICtrlCreateLabel("Repeat password",    20, 420, 400, 30)

$idInpFullname = GUICtrlCreateInput("",        20,  50, 400, 30)
GUICtrlSetData($idInpFullname, "Mr./Ms.")
$idInpEmail = GUICtrlCreateInput("",           20, 130, 400, 30)
GUICtrlSetData($idInpEmail, "")
$idInpTelephone = GUICtrlCreateInput("",       20, 210, 400, 30)
GUICtrlSetData($idInpTelephone, "+1")
$idInpUsername = GUICtrlCreateInput("",        20, 290, 400, 30)
GUICtrlSetData($idInpUsername, "admin")
$idInpPassword = GUICtrlCreateInput("",        20, 370, 400, 30, $ES_PASSWORD)
GUICtrlSetData($idInpPassword, "")
$idInpPasswordCheck = GUICtrlCreateInput("",   20, 450, 400, 30, $ES_PASSWORD)
GUICtrlSetData($idInpPasswordCheck, "")

$idBtnRegister = GUICtrlCreateButton("&Register",  20, 540, 120, 30)
$idBtnCancel   = GUICtrlCreateButton("&Cancel",   160, 540, 120, 30, $BS_DEFPUSHBUTTON)

GUISetState(@SW_SHOW, $hGUI)
While True
    $iGuiMsg = GUIGetMsg()
    Select
        Case $iGuiMsg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $iGuiMsg = $idBtnRegister

            ; messagebox, just for test
            MsgBox(BitOr($MB_SYSTEMMODAL, $MB_ICONINFORMATION), 'Output : ', _
                   GUICtrlRead($idInpFullname) & @CRLF & _
                   GUICtrlRead($idInpEmail) & @CRLF & _
                   GUICtrlRead($idInpTelephone) & @CRLF & _
                   GUICtrlRead($idInpUsername) & @CRLF & _
                   GUICtrlRead($idInpPassword) & @CRLF & _
                   GUICtrlRead($idInpPasswordCheck) & @CRLF)

            Exit
        Case $iGuiMsg = $idBtnCancel
            Exit
    EndSelect
WEnd
GUIDelete($hGUI)

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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
  • Recently Browsing   0 members

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