Sign in to follow this  
Followers 0
sd333221

Input Box with multiple Inputs?

8 posts in this topic

Hi,

I want to make an Input Box, with for exelmple

Username: *Enter Username*

Password: *Enter Password*

But when i use the InputBox Command, there is always only 1 Input Box :P.

Is there another way without creating a GUI?

thank you for your help :lmao:

Share this post


Link to post
Share on other sites



why not create a gui? you can always guidelete after if you dont need the console


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

why not create a gui? you can always guidelete after if you dont need the console

Because i dont really know how =)

Share this post


Link to post
Share on other sites

There's not a way with an input box to have 2 input fields with a single input box.

However, you could simply use the newest beta, look at my signature, and use the "Koda" tool to make a GUI to accomplish this.


[center]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.[/center]

Share this post


Link to post
Share on other sites

Because i dont really know how =)

Here is a quick example from Koda

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("Input Details", 162, 108, 440, 166)
$Input1 = GUICtrlCreateInput("AInput1", 32, 24, 97, 21, -1, $WS_EX_CLIENTEDGE)
$Input2 = GUICtrlCreateInput("AInput2", 32, 80, 97, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Username", 40, 0, 75, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Password", 40, 56, 72, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Thank you alot!

Share this post


Link to post
Share on other sites

HA!! BIG DOD!!, I had decided to help out too!

#include <GUICONSTANTS.AU3>
$MAIN = GUICreate("USERNAME & PASSWORD", 220, 120)
GUICtrlCreateLabel("USERNAME:", 10, 15, 65, 25)
$USERNAME = GUICtrlCreateInput("", 80, 10, 120, 25)
GUICtrlCreateLabel("PASSWORD:", 10, 55, 65, 25)
$PASSWORD = GUICtrlCreateInput("", 80, 50, 120, 25)
$OK = GUICtrlCreateButton("OK", 40, 85, 60, 25)
$CANCEL = GUICtrlCreateButton("CANCEL", 120, 85, 60, 25)

GUISetState()
While 1
    $MSG = GUIGetMsg()
    Select
    Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $CANCEL
        Exit
    Case $MSG = $OK
        If GUICtrlRead($USERNAME) = "SOMETHING CORRECT" And GUICtrlRead($PASSWORD) = "CORRECT TO THE USERNAME" Then
            GUIDelete($MAIN)
        ;WHATEVER YOUR GOING TO DO
        Else
            MsgBox(0, "ERROR", "HEY, CHECK YOUR DIGITS!!, YOU MESSED UP")
        EndIf
    EndSelect
    Sleep(10)
WEnd

By the way, your probably going to have to learn a bit about .ini files sd33221.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Everything works now, thank you alot

Edited by sd333221

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